Webhooks tell your application when something changes in HoneyBook, so you do not have to poll. You subscribe to event types by name; the [Event types](#tag/event-types) entries list every event type, when it is sent and what it carries.

A webhook is an endpoint URL you register together with the event types it receives. A delivery is a signed HTTPS `POST` to that endpoint. It is deliberately thin: it carries ids, never the record itself, so you fetch the current record from the API. The other pages in this section cover the contract: [Events](#tag/events) (what is in every delivery body and which events you receive), [Event types](#tag/event-types) (each event, its scope and schema), [Delivery](#tag/delivery) (retries and ordering) and [Signatures](#tag/signatures) (how to verify a delivery).

### Where the webhooks API lives

Webhooks are managed through the API itself, under `https://api.honeybook.com/api/v3/webhooks`; see [Webhooks](#description/webhooks) in the introduction.

The webhook calls take the OAuth access tokens described in the [Authentication](#tag/authentication) guide. The token's audience must be **`honeybook-webhooks`**, and it must carry the `hb:external_partner_id`, `hb:account_id` and `hb:member_id` claims. The 401 and 403 error codes are listed per operation under **Webhooks** in the API reference. A `502` or `504` means the webhooks service could not be reached or did not answer in time; retry it, as described in [Errors](#tag/errors).

### Create a webhook

Create a webhook with `POST /api/v3/webhooks`:

```bash
curl -X POST https://api.honeybook.com/api/v3/webhooks \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint_url": "https://example.com/honeybook/webhooks",
    "event_types": ["<event type>"]
  }'
```

The response carries a `signing_public_key` (`whpk_...`). Store it: [Signatures](#tag/signatures) shows how to verify deliveries with it. The endpoint must be an `https` URL on port 443 that resolves to a public address. Your application can hold up to 20 active webhooks per account; the next create, or a re-enable, fails with `400` and error code `subscription_cap_exceeded` (`error_type` `HBSubscriptionCapExceeded`). An active webhook for the same URL and event type is refused with `409`. The `id` in the response is the `subscription_id` carried in the body of every delivery for that webhook; store it against your own record of the connection.

The [Webhooks](#tag/webhooks) section of the API Reference has the full request and response for creating, listing, reading, updating and deleting webhooks, including every error.

To stop receiving events, delete the webhook. **Revoking an account holder's grant does not stop delivery**; only deleting the webhook does.

### Which events you receive

An event is delivered to your webhook when it is in the same account and your webhook holds the event's `read` scope: with `<resource>.read` you receive events for every resource in the account, and with `<resource>.read_own` only for resources your application created. **What you receive depends on the read scope you hold.** The [Event types](#tag/event-types) entries give the scope for each event type.

A token that covers several companies needs the `ctxc=<company_id>` query parameter on every other API call to say which company the call is for; a token that covers one company does not need it. Leaving it out is not a safe default: the API may act on the member's first company rather than reject the call. The webhook calls are the exception and do not use `ctxc`: a webhook belongs to the account in the token.

### Keep your own mapping

A delivery carries HoneyBook ids only. When you create a resource through the API, store the returned `id` against your own record, and look your record up by the id in the delivery when one arrives.
