# Webhook endpoints

Register endpoints and inspect deliveries.

Base URL: https://api.audiobly.com

### PUT /v1/webhook-endpoints/{endpoint_id}

Update webhook

Update a webhook endpoint (only the fields sent change). Re-enabling a disabled
endpoint clears its failure count and disabled reason, and sends the events held while it
was off (deliveries with status `held`: the newest 1,000 from the last 7 days, of the event
types it subscribes to), oldest first; `?discard_held=true` deletes them instead. Returns
404 for an unknown endpoint.

Scope: org_manage

Parameters:

- `endpoint_id` (path, string (uuid), required)
- `discard_held` (query, boolean): When this call switches the endpoint back on: delete the events held while it was off instead of sending them.

Body (JSON):

- `subscribed_events` (array of string): The event types this endpoint should receive.
- `url` (string): The https address that receives the notifications.
- `enabled` (boolean): Whether the endpoint receives notifications.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.
