# Update a webhook

Changes a webhook: send only the fields to change.

`PATCH /v1/webhooks/{id}` on `https://api.eu.vatis.tech`

> **Admin key only.** A Member key gets `403` `admin_only`. Roles: [Authentication and API keys](https://platform.vatis.tech/docs/authentication).

## Path parameters

| parameter | values | default | meaning |
|---|---|---|---|
| `id` | a webhook id, `wh_...` | required | The webhook. |

## Headers

| header | values | default | meaning |
|---|---|---|---|
| `Authorization` | `Bearer <api key>` | required | An Admin key ([Roles](https://platform.vatis.tech/docs/authentication#roles)). A Member key gets `403` `admin_only`. |

## Body fields (`application/json`)

| field | values | default | meaning |
|---|---|---|---|
| `url` | `http://` or `https://`, up to 2048 characters |  | Where deliveries go. The API must reach it from the internet: loopback, link-local and private network addresses are refused (`400` `invalid_parameter`). |
| `name` | up to 200 characters, or `null` |  | A name for your own use. |
| `enabled` | `true`, `false` |  | Turn deliveries on or off. |
| `retry` | `true`, `false` |  | Retry failed deliveries. |
| `headers` | a JSON object of strings |  | Your own headers for each delivery, with the limits of [Create a webhook](https://platform.vatis.tech/docs/endpoints/create-a-webhook). |
| `events` | a JSON list of `transcript.completed`, `transcript.failed` or both |  | The events it gets, in place of the list it had, with the rules of [Create a webhook](https://platform.vatis.tech/docs/endpoints/create-a-webhook). |

## Response fields

| field | when | meaning |
|---|---|---|
| `id` |  | `wh_` and 16 hex digits. |
| `url` |  | Where deliveries go. |
| `name` |  | Your name for it, or `null`. |
| `enabled` |  | Whether deliveries go out. A new webhook is on. |
| `retry` |  | Whether failed deliveries are retried. |
| `headers` |  | Your own headers for each delivery, `{}` when there are none. |
| `events` |  | The events it gets: `transcript.completed`, `transcript.failed` or both, in that order. |
| `created_at` |  | ISO 8601, UTC. |

## Responses

`200`: The webhook as it is now, without its secret.

```json
{
  "id": "wh_a97581d905c54b46",
  "url": "https://crm.example.com/vatis",
  "name": "crm",
  "enabled": false,
  "retry": true,
  "headers": {},
  "events": [
    "transcript.completed",
    "transcript.failed"
  ],
  "created_at": "2026-11-12T09:14:03Z"
}
```

`400` `invalid_parameter`: A field that is unknown or not valid, or a query parameter (these endpoints take none). The `param` names it.

`400` `invalid_request`: A body that is not a JSON object.

`401` `unauthorized`: No key, or a wrong, revoked or expired one.

```json
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid, revoked or expired key.",
    "param": null,
    "request_id": "req_bf2fed760ba5437ba0933a57"
  }
}
```

`403` `admin_only`: A Member key.

`404` `not_found`: No webhook of your workspace has that id.

```json
{
  "error": {
    "code": "not_found",
    "message": "Webhook not found.",
    "param": null,
    "request_id": "req_bf2fed760ba5437ba0933a57"
  }
}
```

`413` `request_too_large`: A JSON body over 64 KB.

`503` `unavailable`: The service is busy for a moment. Send the request again after the seconds of the `Retry-After` header.

## Notes

- A turned-off webhook gets no deliveries, and a job sent with its id is refused: `400` `invalid_parameter`, `param` `webhook_id`.
- The secret cannot be changed: create a new webhook instead.
