---
title: "Update a webhook endpoint"
canonical: "https://bird.com/docs/api/reference/update-webhook"
---

# Update a webhook endpoint

`PATCH /v1/webhooks/{webhook_id}`

Updates the webhook endpoint. Only the fields you send change: `events` replaces the
whole subscription set, and `status` pauses or re-enables delivery.

The `200` response is the updated endpoint. Invalid input (a non-HTTPS or non-public
`url`, an event type outside the catalog) returns a `422`. Updating a connector endpoint
does not contact its platform. `next` suggests [testing the endpoint](/docs/api/reference/test-webhook),
which checks its fields with the platform.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
const endpoint = await bird.webhooks.update("whk_01krdgeqcxet5s7t44vh8rt9mg", {
  events: ["email.delivered"],
});
console.log(endpoint.events);
```

Examples: [TypeScript](/docs/api/reference/update-webhook.ts.md) · [Python](/docs/api/reference/update-webhook.py.md) · [Go](/docs/api/reference/update-webhook.go.md) · [PHP](/docs/api/reference/update-webhook.php.md) · [CLI](/docs/api/reference/update-webhook.cli.md) · [MCP](/docs/api/reference/update-webhook.mcp.md) · [cURL](/docs/api/reference/update-webhook.curl.md)

## Example response `200`

```json
{
  "id": "whk_01krdgeqcxet5s7t44vh8rt9mg",
  "url": "https://example.com/webhook",
  "description": "Production webhook endpoint",
  "filter": null,
  "events": [
    "email.delivered",
    "email.bounced"
  ],
  "status": "active",
  "destination": {
    "type": "webhook"
  },
  "next": [
    {
      "kind": "operation"
    }
  ],
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-25T16:42:01Z"
}
```

## Path parameters

- `webhook_id` (string, required): ID of the webhook endpoint (`whk_` prefix), as returned when it was created.

## Header parameters

- `Idempotency-Key` (string, optional)

  Client-supplied key. On operations supporting request deduplication, a retained
  response is replayed for duplicate requests with the same key within the
  idempotency window (3 hours by default). This protection requires a workspace,
  organization, or staff-account scope. User-only and unscoped unauthenticated operations,
  streams, and operations with a separate replay contract do not use this
  response replay.

  On a supported operation, if idempotency protection is unavailable before execution, the API returns
  `503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with
  backoff using the same key and request. An operation that takes effect before
  its response is retained can still execute again on retry.

  Two distinct 409 errors signal misuse:

  - `request_in_progress` (E01004): The same key is currently being
    processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  - `idempotency_key_reuse` (E01005): The same key has already completed
    against a different request body or method. Generate a new key.

  Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Request body

- `url` (string): Replacement delivery URL. Same rules as at creation: HTTPS, at most 2048 characters, and the host must be publicly reachable (private, loopback, and link-local addresses return a `422`). Omit to keep the current URL. A connector endpoint's URL comes from its connector and cannot be replaced: any value returns a `422`.
- `description` (string): Human-readable label for this endpoint, up to 256 characters.
- `filter` (nullable object): Replace the mailbox scope. Omit to keep it, or send null to include all resources. Scoped endpoints accept only email_mailbox events.
- `filter.mailbox_id` (string, required): Mailbox to receive events for. Must belong to this workspace; a mailbox outside it returns `422`.
- `events` (array of string): Replaces all event subscriptions with this list. Omit to keep the current set. Types outside the event catalog return a `422`.
- `destination` (object): Changes to how deliveries are built, shaped as at creation. Only a `connector` destination takes `connector`; on any other endpoint it returns a `422`. Omit to keep the destination.
- `destination.type` (string)

  How deliveries to the webhook endpoint are built: `webhook` posts the signed event unchanged to the endpoint URL; `connector` builds the delivery using the configured connector action. An existing endpoint's type cannot change; a different value returns a `422`.

  Possible values: `webhook`, `connector`
- `destination.connector` (object): Changes to the endpoint's connector, nested as on creation. A field the endpoint's URL is built from moves the URL with it. New deliveries are prepared with the current config. Queued deliveries keep their prepared body, but every send attempt, including retries, uses the current destination URL and credentials.
- `destination.connector.connector_id` (string): The endpoint's connector. It cannot change, so a different value returns a `422`.
- `destination.connector.action` (string): The endpoint's action. It cannot change, so a different value returns a `422`.
- `destination.connector.credentials` (object): New values for the connector's secret fields, merged over the stored ones: a key given replaces that field and an omitted key keeps its value. The next delivery, retries included, uses them.
- `destination.connector.config` (object): Changes to the connector's nonsecret fields, keyed by field `name`. A key given replaces that field, `null` clears an optional one, and a key left out keeps its stored value. A required field cannot be cleared, and the result is checked as at creation.
- `status` (string)

  `paused` stops all deliveries; `active` re-enables a paused endpoint. Omit to leave the status unchanged. Events that fire while paused are not delivered and a replay cannot recover them, because they were never attempted; after re-enabling, [Replay failed deliveries](/docs/api/reference/create-webhook-replay) reaches only the deliveries that failed before the pause. A `degraded` endpoint cannot be reset through this field: it returns to `active` automatically once deliveries succeed again.

  Possible values: `active`, `paused`

## Response body

- `id` (string, required): Unique identifier for the endpoint (`whk_` prefix). Accepted as `webhook_id` by every `/v1/webhooks/{webhook_id}` operation.
- `url` (string, required): HTTPS URL where the API delivers events for this endpoint.
- `description` (string): Human-readable label for the endpoint.
- `filter` (nullable object, required): Mailbox scope configured through filter, or null.
- `filter.mailbox_id` (string, required): Mailbox to receive events for. Must belong to this workspace; a mailbox outside it returns `422`.
- `events` (array of string, required): Event types this endpoint is subscribed to; only matching events are delivered. Change the set with [Update a webhook endpoint](/docs/api/reference/update-webhook).
- `status` (string, required)

  Delivery state of the endpoint.

  - `active`: The initial state; events are being delivered normally.
  - `degraded`: Recent deliveries are failing. We keep delivering and retrying,
    and the endpoint returns to `active` automatically once deliveries succeed
    again.
  - `paused`: All delivery is stopped, either because an update set `status` to
    `paused` or automatically after sustained delivery failures. A paused endpoint
    never resumes on its own: re-enable it with
    [Update a webhook endpoint](/docs/api/reference/update-webhook), then
    [Replay failed deliveries](/docs/api/reference/create-webhook-replay) to
    recover the deliveries that failed before the pause. Events that arrived
    while it was paused were never attempted, so a replay does not reach them.

  Possible values: `active`, `degraded`, `paused`
- `destination` (object): How each delivery to the endpoint is built.
  - Variant `webhook`: Posts the signed event to the endpoint's `url` unchanged.
    - `destination.type` (string, required): Value: `webhook`
  - Variant `connector`: Sends the request a connector action builds, with the credentials stored for this endpoint. The endpoint's URL comes from its connector setup, so updating the endpoint with a `url` returns a `422`.
    - `destination.type` (string, required): Value: `connector`
    - `destination.connector` (object, required)
    - `destination.connector.connector_id` (string, required): Stable identifier of a connector, such as `claude_managed_agents`.
    - `destination.connector.action` (string, required): Action of the connector that each delivery runs.
    - `destination.connector.connection_name` (string, required): Label of the credentials the endpoint delivers with.
    - `destination.connector.config` (object): The connector's nonsecret fields as the endpoint delivers with them. Secret fields are never returned.
- `next` (array of object): What to do next with this endpoint. The responses that create or update a connector endpoint suggest testing it, which checks its fields with the connected platform. Other responses that return one endpoint return an empty list, and lists omit it.
- `next.kind` (string, required)

  What you do about this step.

  - `operation`: call the operation named in `operation`, then
    read again.
  - `external`: act somewhere this API does not reach, then read
    again.
  - `wait`: nothing is asked of you, so read again later.
  - `terminal`: nothing you do resolves this, so stop retrying.

  Tolerate a value you do not recognize: show the `description` and
  offer no action.

  Possible values (may grow over time): `operation`, `external`, `wait`, `terminal`
- `next.description` (string, required): A short, human-readable label for the step, suitable for display.
- `next.operation` (string): The operationId to call. Present only when `kind` is `operation`. The operation's own schema says how to call it; this says only which one, and what to address it with.
- `next.params` (object): The parameters that address the operation, by name: `{"sender_id": "…"}` for an operation on `/v1/sms/senders/{sender_id}/requirements`. A parameter the operation takes in its query string is given the same way, so an operation addressed as `?subject_id=` carries `{"subject_id": "…"}`. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when `kind` is `operation` and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.
- `next.url` (string): A URL to open. Present only when `kind` is `external`, and only when the step has one. An external step whose `description` says to go and do something with no URL to open is normal.
- `created_at` (string, required)
- `updated_at` (string, required)

## Related resources

- [Webhooks done right: reliable delivery events](/learn/basics/webhooks-done-right-reliable-delivery-events) (video)
- [How do I verify a webhook signature?](/explained/platform/how-do-i-verify-a-webhook-signature) (answer)
- [Operate messaging reliably](/learn/paths/reliability) (course)
- [Webhooks & events](/docs/guides/webhooks) (docs)

[Get an implementation brief](/learn/workspace?topic=webhooks)
