<Intro>

<EndpointHeader />

<Description>

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`.

</Description>

</Intro>

<Payload kind="request">

<Field name="url" type="string">

<Description>

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.

</Description>

</Field>

<Field name="description" type="string">

<Description>

Human-readable label for this endpoint, up to 256 characters.

</Description>

</Field>

<Field name="events" type="array of string">

<Description>

Replacement set of event type subscriptions: the endpoint's subscriptions become exactly this list (there is no partial add or remove). Omit to keep the current set. Types outside the event catalog return a `422`, and a `realtime.*` type can only be added to an endpoint that already has a Realtime app scope.

</Description>

</Field>

<Field name="status" type="string">

<Description>

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

</Description>

<Description>

Possible values: `active`, `paused`

</Description>

</Field>

</Payload>

<Payload kind="response">

<Field name="id" type="string" required>

<Description>

Unique identifier for the endpoint (`whk_` prefix). Accepted as `webhook_id` by every `/v1/webhooks/{webhook_id}` operation.

</Description>

</Field>

<Field name="url" type="string" required>

<Description>

HTTPS URL Bird delivers this endpoint's events to.

</Description>

</Field>

<Field name="description" type="string">

<Description>

Human-readable label for the endpoint.

</Description>

</Field>

<Field name="events" type="array of string" required>

<Description>

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).

</Description>

</Field>

<Field name="status" type="string" required>

<Description>

Delivery state of the endpoint.

- `active`: the initial state; events are being delivered normally.
- `degraded`: recent deliveries are failing. Bird keeps 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 recover
  the missed events with
  [Replay missed events](/docs/api/reference/create-webhook-replay).

</Description>

<Description>

Possible values: `active`, `degraded`, `paused`

</Description>

</Field>

<Field name="created_at" type="string" required />

<Field name="updated_at" type="string" required />

</Payload>