> ## Documentation Index
> Fetch the complete documentation index at: https://dronebundle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Webhook

> Update an existing webhook subscription.

Requires an API key with `full_access` scope. All fields are optional. Only include the fields you want to change.

## Path parameters

<ParamField path="webhookId" type="string" required>
  The unique identifier of the webhook.
</ParamField>

## Body

<ParamField body="name" type="string">
  Webhook name. 2 to 100 characters.
</ParamField>

<ParamField body="url" type="string">
  The HTTPS endpoint that will receive webhook deliveries. Must start with `https://`.
</ParamField>

<ParamField body="event_types" type="string[]">
  List of event types to subscribe to. Must include at least one of:

  `project.created`, `project.updated`, `project.deleted`, `job.created`, `job.updated`, `job.deleted`, `job_type.created`, `job_type.deleted`
</ParamField>

<ParamField body="status" type="string">
  Webhook status. Either `active` or `paused`. Setting to `active` resets the failure count to `0`.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.dronebundle.com/v1/webhooks/019d5221-b413-71a9-a56b-f70bc91efe63 \
    -H "Authorization: Bearer v1_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated webhook name",
      "event_types": ["project.created", "job.created", "job.updated"]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Webhook updated"
  }
  ```
</ResponseExample>

## Errors

**400 Bad Request** - Validation failed.

```json theme={null}
{
  "message": "name must be between 2 and 100 characters"
}
```

Other validation messages include:

* `name must be a string`
* `url must be a string starting with https://`
* `event_types must be a non-empty array`
* `Invalid event type: {type}`
* `status must be one of: active, paused`
* `At least one field to update is required (name, url, event_types, status)`

**404 Not Found** - Webhook not found.

```json theme={null}
{
  "message": "Webhook not found"
}
```
