# Webhooks

> Endpoints that receive the event log, the delivery log, replay

Source: https://rcms-tickets-test.web.app/docs/reference/webhooks

Every operation below is also in [the OpenAPI document](https://rcms-tickets-test.web.app/v1/openapi.yaml). One that names an MCP tool can be called through [the MCP server](https://rcms-tickets-test.web.app/docs/mcp.md); one that names none cannot.

## List webhook endpoints

`GET /v1/webhook_endpoints`

Operation id `listWebhookEndpoints`. MCP tool `list_webhook_endpoints`. SDK `tickets.webhookEndpoints.list`.

Webhook endpoints (16 at most): where we POST the event log. Never their secrets.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | integer | How many to return, 1 to 100 (default 20). |
| `starting_after` | query | string | An id from the page before: the page after it. |
| `ending_before` | query | string | An id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other… |
| `mode` | query | "test" \| "live" | A dashboard session's look at the other mode's endpoints. A key sees its own mode only: another mode is refused. |

**Answers 200.** Every endpoint (16 at most).

**Fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "list" |  |
| `data` * | array of WebhookEndpoint | This page, newest first. |
| `has_more` * | boolean | True when there is another page: pass the last id as starting_after. |
| `url` * | "/v1/webhook_endpoints" | The path this list came from (/v1/webhook_endpoints). |

\* required

## Add an endpoint

`POST /v1/webhook_endpoints`

Operation id `createWebhookEndpoint`. MCP tool `create_webhook_endpoint`. SDK `tickets.webhookEndpoints.create`.

Adds an endpoint and the event types it wants (`order.paid`, `ticket.checked_in`...). The signing secret is in the answer once: keep it to verify deliveries (the SDK's `webhooks.verify`). An endpoint belongs to one mode and gets that mode's events.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

**Request body** (`CreateWebhookEndpointInput`)

| Field | Type | Description |
| --- | --- | --- |
| `url` * | string (uri) | An https URL on the public internet. |
| `events` * | array of EventLogType |  |
| `description` | string |  |

\* required

```json
{
  "url": "https://example.com/hooks",
  "events": [
    "order.paid"
  ]
}
```

**Answers 201.** The endpoint and its signing secret (shown once).

**Fields** (`WebhookEndpointWithSecret`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_endpoint" |  |
| `id` * | string | An id starting with whe_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `url` * | string |  |
| `events` * | array of EventLogType |  |
| `description` * | string \| null |  |
| `status` * | "enabled" \| "disabled" |  |
| `created_by` * | string \| null | Who made it: the member, or the member who made the key that made it. Null: nothing on record says. |
| `created_by_name` * | string \| null | Who made it, kept once they have left the org. Null while they are on the team (their name is in GET /v1/members). |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `updated_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `secret` * | string | The signing secret (whsec_…): shown when made or rolled. |

\* required

**Errors of its own.** [`too_many_webhook_endpoints`](https://rcms-tickets-test.web.app/docs/errors.md#too_many_webhook_endpoints). The errors every operation can answer are on [the errors page](https://rcms-tickets-test.web.app/docs/errors.md).

## Check that a URL answers before saving it

`POST /v1/webhook_endpoints/check_url`

Operation id `checkWebhookUrl`. MCP tool `check_webhook_url`. SDK `tickets.webhookEndpoints.checkUrl`.

Calls a URL before you save it and says what it answered. An unreachable URL is a 200 with `reachable: false`.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

**Request body** (`CheckWebhookUrlInput`)

| Field | Type | Description |
| --- | --- | --- |
| `url` * | string (uri) | The https URL you mean to save. |

\* required

```json
{
  "url": "https://example.com/hooks"
}
```

**Answers 200.** What the URL answered (an unreachable one is a 200 too: reachable says).

**Fields** (`WebhookUrlCheck`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_url_check" |  |
| `url` * | string |  |
| `reachable` * | boolean | It answered over https with any status below 500 (a 400 or 401 for our unsigned check is fine: the endpoint is there and verifies signatures). |
| `response_status` * | integer \| null |  |
| `duration_ms` * | integer |  |
| `failure` * | "not_public" \| "dns" \| "connection" \| "tls" \| "timeout" \| "redirect" \| "server_error" \| null | Why not: not_public (it resolves to a private, loopback or link-local address: we never call those), dns, connection, tls (a bad certificate), timeout (10 seconds), redirect (we follow none), server_error (5xx). null wh… |

\* required

## Retrieve an endpoint

`GET /v1/webhook_endpoints/{id}`

Operation id `getWebhookEndpoint`. MCP tool `get_webhook_endpoint`. SDK `tickets.webhookEndpoints.retrieve`.

One endpoint with its URL, the event types it receives and its status. Never its signing secret.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whe_. |

**Answers 200.** The endpoint.

**Fields** (`WebhookEndpoint`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_endpoint" |  |
| `id` * | string | An id starting with whe_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `url` * | string |  |
| `events` * | array of EventLogType |  |
| `description` * | string \| null |  |
| `status` * | "enabled" \| "disabled" |  |
| `created_by` * | string \| null | Who made it: the member, or the member who made the key that made it. Null: nothing on record says. |
| `created_by_name` * | string \| null | Who made it, kept once they have left the org. Null while they are on the team (their name is in GET /v1/members). |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `updated_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

## Change an endpoint

`PATCH /v1/webhook_endpoints/{id}`

Operation id `updateWebhookEndpoint`. MCP tool `update_webhook_endpoint`. SDK `tickets.webhookEndpoints.update`.

Changes an endpoint's URL, event types or description, or disables it.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whe_. |

**Request body** (`UpdateWebhookEndpointInput`)

| Field | Type | Description |
| --- | --- | --- |
| `url` | string (uri) | An absolute https URL. |
| `events` | array of EventLogType |  |
| `description` | string \| null |  |
| `status` | "enabled" \| "disabled" | disabled: nothing is sent, and what happens meanwhile is not sent later. |

```json
{
  "status": "disabled"
}
```

**Answers 200.** Updated.

**Fields** (`WebhookEndpoint`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_endpoint" |  |
| `id` * | string | An id starting with whe_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `url` * | string |  |
| `events` * | array of EventLogType |  |
| `description` * | string \| null |  |
| `status` * | "enabled" \| "disabled" |  |
| `created_by` * | string \| null | Who made it: the member, or the member who made the key that made it. Null: nothing on record says. |
| `created_by_name` * | string \| null | Who made it, kept once they have left the org. Null while they are on the team (their name is in GET /v1/members). |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `updated_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

## Delete an endpoint

`DELETE /v1/webhook_endpoints/{id}`

Operation id `deleteWebhookEndpoint`. MCP tool `delete_webhook_endpoint`. SDK `tickets.webhookEndpoints.delete`.

Deletes an endpoint so nothing more is sent to it. Deliveries already made stay in the delivery log.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whe_. |

**Answers 200.** Deleted.

**Fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_endpoint" |  |
| `id` * | string | An id starting with whe_. |
| `deleted` * | true |  |

\* required

## Roll the signing secret

`POST /v1/webhook_endpoints/{id}/roll_secret`

Operation id `rollWebhookSecret`. MCP tool `roll_webhook_secret`. SDK `tickets.webhookEndpoints.rollSecret`.

Makes a new signing secret and keeps the old one signing too until `expires_in_hours`. A delivery then carries two signatures during the roll.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whe_. |

**Request body** (`RollWebhookSecretInput`)

| Field | Type | Description |
| --- | --- | --- |
| `expires_in_hours` | integer | The old secret also signs until then. |

```json
{
  "expires_in_hours": 0
}
```

**Answers 200.** The new secret; the old one also signs until it expires.

**Fields** (`WebhookEndpointWithSecret`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_endpoint" |  |
| `id` * | string | An id starting with whe_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `url` * | string |  |
| `events` * | array of EventLogType |  |
| `description` * | string \| null |  |
| `status` * | "enabled" \| "disabled" |  |
| `created_by` * | string \| null | Who made it: the member, or the member who made the key that made it. Null: nothing on record says. |
| `created_by_name` * | string \| null | Who made it, kept once they have left the org. Null while they are on the team (their name is in GET /v1/members). |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `updated_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `secret` * | string | The signing secret (whsec_…): shown when made or rolled. |

\* required

## Send a test delivery

`POST /v1/webhook_endpoints/{id}/test`

Operation id `testWebhookEndpoint`. MCP tool `test_webhook_endpoint`. SDK `tickets.webhookEndpoints.test`.

Sends a test delivery of an event type to the endpoint and records it.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whe_. |

**Request body** (`TestWebhookInput`)

| Field | Type | Description |
| --- | --- | --- |
| `type` | EventLogType |  |

```json
{
  "type": "hold.expired"
}
```

**Answers 201.** The test delivery.

**Fields** (`WebhookDelivery`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_delivery" |  |
| `id` * | string | An id starting with whd_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `endpoint` * | string | An id starting with whe_. |
| `event_log` * | string | An id starting with log_. |
| `type` * | EventLogType | What changed. The list only grows; an endpoint gets only the types it asked for. |
| `status` * | "pending" \| "succeeded" \| "failed" | failed after the last retry. |
| `test` * | boolean |  |
| `request_body` * | string \| null | The JSON we POST (the event log row), as sent the first time, with every private link and Add to Wallet token and any secret cut out ("[redacted]"), at most 8192 bytes. null while pending its first attempt. |
| `held` | true | Present while it waits because the service can't read its event yet (a new version may be on its way). It goes out on its own, or shows as failed where a replay sends it. No attempt counts while it waits. |
| `request_truncated` * | boolean | request_body was cut at the limit (the whole row is GET /v1/event_log/{event_log}). |
| `request_withheld` | true | Present when request_body is null because this reader may not read it: the delivery of a code.* event holds the text of the code, which a read key does not read. |
| `attempts` * | array of object |  |
| `next_attempt_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `replay_of` * | string \| null | An id starting with whd_. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

**Errors of its own.** [`invalid_state_transition`](https://rcms-tickets-test.web.app/docs/errors.md#invalid_state_transition). The errors every operation can answer are on [the errors page](https://rcms-tickets-test.web.app/docs/errors.md).

## The delivery log

`GET /v1/webhook_deliveries`

Operation id `listWebhookDeliveries`. MCP tool `list_webhook_deliveries`. SDK `tickets.webhookDeliveries.list`.

The delivery log: each attempt's status, filtered by endpoint, status or type.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | integer | How many to return, 1 to 100 (default 20). |
| `starting_after` | query | string | An id from the page before: the page after it. |
| `ending_before` | query | string | An id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other… |
| `endpoint` | query | string | An id starting with whe_. |
| `status` | query | "pending" \| "succeeded" \| "failed" |  |
| `type` | query | "event.created" \| "event.updated" \| "event.published" \| "event.paused" \| "event.resumed" \| "event.ended" \| "event.postponed" \| "event.cancelled" \| "ticket_type.created" \| "ticket_type.updated" \| "add_on.created" \| "add_on.updated" \| "code.created" \| "code.updated" \| "hold.created" \| "hold.updated" \| "hold.extended" \| "hold.released" \| "hold.expired" \| "order.created" \| "order.paid" \| "order.tickets_issued" \| "order.updated" \| "order.cancelled" \| "order.refunded" \| "order.exchanged" \| "order.disputed" \| "order.dispute_closed" \| "order.dispute_updated" \| "refund.succeeded" \| "refund.failed" \| "payment.succeeded" \| "payment.failed" \| "dispute.opened" \| "dispute.updated" \| "dispute.closed" \| "payout.paid" \| "payout.failed" \| "inventory.returned" \| "inventory.adjusted" \| "ticket.issued" \| "ticket.updated" \| "ticket.reissued" \| "ticket.exchanged" \| "ticket.transferred" \| "ticket.voided" \| "ticket.frozen" \| "ticket.unfrozen" \| "ticket.checked_in" \| "ticket.checkin_undone" \| "transfer.created" \| "transfer.accepted" \| "transfer.cancelled" \| "transfer.expired" \| "exchange.created" \| "exchange.completed" \| "exchange.cancelled" \| "exchange.expired" \| "checkin_conflict.created" \| "checkin_conflict.resolved" \| "device.created" \| "device.paired" \| "device.updated" \| "device.revoked" \| "device.expired" \| "door_sale.created" \| "close_out.created" \| "wallet_message.created" \| "partner.created" \| "partner.updated" \| "tracking_link.created" \| "buyer.erased" | What changed. The list only grows; an endpoint gets only the types it asked for. |
| `created_gte` | query | string (date-time) | Only those created at or after this instant. |
| `created_lt` | query | string (date-time) | Only those created before this instant. |

**Answers 200.** A page of deliveries.

**Fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "list" |  |
| `data` * | array of WebhookDelivery | This page, newest first. |
| `has_more` * | boolean | True when there is another page: pass the last id of `data` as starting_after, or the last id of `unreadable` when `data` is empty. |
| `url` * | "/v1/webhook_deliveries" | The path this list came from (/v1/webhook_deliveries). |
| `unreadable` | array of object | Rows of this page the service could not read, in place of showing them: they exist and are kept, so a page without them is not the whole list. Absent when there are none. A page names at most 25; past that it stops and… |

\* required

## Retrieve a delivery

`GET /v1/webhook_deliveries/{id}`

Operation id `getWebhookDelivery`. MCP tool `get_webhook_delivery`. SDK `tickets.webhookDeliveries.retrieve`.

One delivery with each attempt's status, response code and time, so a failing endpoint can be debugged.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whd_. |

**Answers 200.** The delivery with its attempts.

**Fields** (`WebhookDelivery`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_delivery" |  |
| `id` * | string | An id starting with whd_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `endpoint` * | string | An id starting with whe_. |
| `event_log` * | string | An id starting with log_. |
| `type` * | EventLogType | What changed. The list only grows; an endpoint gets only the types it asked for. |
| `status` * | "pending" \| "succeeded" \| "failed" | failed after the last retry. |
| `test` * | boolean |  |
| `request_body` * | string \| null | The JSON we POST (the event log row), as sent the first time, with every private link and Add to Wallet token and any secret cut out ("[redacted]"), at most 8192 bytes. null while pending its first attempt. |
| `held` | true | Present while it waits because the service can't read its event yet (a new version may be on its way). It goes out on its own, or shows as failed where a replay sends it. No attempt counts while it waits. |
| `request_truncated` * | boolean | request_body was cut at the limit (the whole row is GET /v1/event_log/{event_log}). |
| `request_withheld` | true | Present when request_body is null because this reader may not read it: the delivery of a code.* event holds the text of the code, which a read key does not read. |
| `attempts` * | array of object |  |
| `next_attempt_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `replay_of` * | string \| null | An id starting with whd_. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

## Send a delivery again

`POST /v1/webhook_deliveries/{id}/replay`

Operation id `replayWebhookDelivery`. MCP tool `replay_webhook_delivery`. SDK `tickets.webhookDeliveries.replay`.

Sends a delivery again as a new delivery with the same `webhook-id`, so a handler that deduplicates on it does not run twice.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `webhooks.manage` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with whd_. |

**Answers 201.** A new delivery with the same webhook-id.

**Fields** (`WebhookDelivery`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "webhook_delivery" |  |
| `id` * | string | An id starting with whd_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `endpoint` * | string | An id starting with whe_. |
| `event_log` * | string | An id starting with log_. |
| `type` * | EventLogType | What changed. The list only grows; an endpoint gets only the types it asked for. |
| `status` * | "pending" \| "succeeded" \| "failed" | failed after the last retry. |
| `test` * | boolean |  |
| `request_body` * | string \| null | The JSON we POST (the event log row), as sent the first time, with every private link and Add to Wallet token and any secret cut out ("[redacted]"), at most 8192 bytes. null while pending its first attempt. |
| `held` | true | Present while it waits because the service can't read its event yet (a new version may be on its way). It goes out on its own, or shows as failed where a replay sends it. No attempt counts while it waits. |
| `request_truncated` * | boolean | request_body was cut at the limit (the whole row is GET /v1/event_log/{event_log}). |
| `request_withheld` | true | Present when request_body is null because this reader may not read it: the delivery of a code.* event holds the text of the code, which a read key does not read. |
| `attempts` * | array of object |  |
| `next_attempt_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `replay_of` * | string \| null | An id starting with whd_. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required
