# Webhooks

> Endpoints, signing secrets, the delivery log, test events and replays.

URL: https://docs.workwae.com/reference/webhooks

Guides: [Webhooks](/guides/webhooks), [Signatures](/guides/webhook-signatures), [Delivery and replay](/guides/webhook-delivery), [Events](/guides/events).

| Method | Path | Operation | Scope |
| --- | --- | --- | --- |
| `GET` | `/v1/webhooks` | [List webhook endpoints](#list-webhook-endpoints) | `read` |
| `POST` | `/v1/webhooks` | [Create a webhook endpoint](#create-a-webhook-endpoint) | `write` |
| `PATCH` | `/v1/webhooks/{endpointId}` | [Update a webhook endpoint](#update-a-webhook-endpoint) | `write` |
| `DELETE` | `/v1/webhooks/{endpointId}` | [Delete a webhook endpoint](#delete-a-webhook-endpoint) | `write` |
| `POST` | `/v1/webhooks/{endpointId}/rotate-secret` | [Rotate the signing secret](#rotate-the-signing-secret) | `write` |
| `POST` | `/v1/webhooks/{endpointId}/test` | [Send a test event](#send-a-test-event) | `write` |
| `GET` | `/v1/webhooks/{endpointId}/attempts` | [Read the delivery log](#read-the-delivery-log) | `read` |
| `POST` | `/v1/webhooks/{endpointId}/replay` | [Replay a time range](#replay-a-time-range) | `write` |
| `POST` | `/v1/webhooks/{endpointId}/events/{eventId}/replay` | [Replay one event](#replay-one-event) | `write` |
| `GET` | `/v1/webhooks/{endpointId}/failed-deliveries/count` | [Count failed deliveries](#count-failed-deliveries) | `read` |
| `POST` | `/v1/webhooks/{endpointId}/replay-failed` | [Replay failed deliveries](#replay-failed-deliveries) | `write` |

## List webhook endpoints

`GET /v1/webhooks`

TypeScript SDK method: `workwae.webhooks.list()`

Required scope: `read`.

### Responses

- **200** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | object[] | yes |  |
| `items[].id` | string (uuid) | yes | Example `"c4e6a8b0-1d3f-4a5c-8e7b-9d1f3a5c7e9b"`. |
| `items[].url` | string (uri) | yes | Example `"https://app.example.com/"`. |
| `items[].description` | string \| null | yes | Example `"Production"`. |
| `items[].filters` | object | yes |  |
| `items[].filters.eventTypes` | ("account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test")[] | yes |  |
| `items[].filters.accountIds` | string (uuid)[] | yes |  |
| `items[].filters.message` | object | yes |  |
| `items[].isEnabled` | boolean | yes |  |
| `items[].disabledReason` | string \| null | yes |  |
| `items[].lastSuccessAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `items[].failingSince` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `items[].previousSecretExpiresAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `items[].createdAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Create a webhook endpoint

`POST /v1/webhooks`

TypeScript SDK method: `workwae.webhooks.create()`

The signing secret is returned once.

Required scope: `write`.

### Request body (required)

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string (uri) | yes | Example `"https://app.example.com/"`. |
| `description` | string | no | At most 500 characters. Example `"Production"`. |
| `filters` | object | no |  |
| `filters.eventTypes` | ("account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test")[] | no | At most 100 items. |
| `filters.accountIds` | string (uuid)[] | no | At most 100 items. |
| `filters.message` | object | no |  |
| `filters.message.mailboxIds` | string (uuid)[] | no | At most 100 items. |
| `filters.message.mailboxRoles` | ("inbox" \| "sent" \| "drafts" \| "trash" \| "junk" \| "archive" \| "all" \| "important" \| "custom")[] | no | At most 9 items. |
| `filters.message.from` | string[] | no | At most 100 items. |
| `filters.message.to` | string[] | no | At most 100 items. |
| `filters.message.subjectContains` | string[] | no | At most 100 items. |
| `filters.message.hasAttachments` | boolean \| null | no |  |
| `filters.message.direction` | "inbound" \| "outbound" \| null | no |  |

### Responses

- **201** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint` | object | yes |  |
| `endpoint.id` | string (uuid) | yes | Example `"c4e6a8b0-1d3f-4a5c-8e7b-9d1f3a5c7e9b"`. |
| `endpoint.url` | string (uri) | yes | Example `"https://app.example.com/"`. |
| `endpoint.description` | string \| null | yes | Example `"Production"`. |
| `endpoint.filters` | object | yes |  |
| `endpoint.filters.eventTypes` | ("account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test")[] | yes |  |
| `endpoint.filters.accountIds` | string (uuid)[] | yes |  |
| `endpoint.filters.message` | object | yes |  |
| `endpoint.isEnabled` | boolean | yes |  |
| `endpoint.disabledReason` | string \| null | yes |  |
| `endpoint.lastSuccessAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `endpoint.failingSince` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `endpoint.previousSecretExpiresAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `endpoint.createdAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `secret` | string | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `https_required`, `mailbox_outside_accounts`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`, `plan_limit_webhooks`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`, `unknown_account`, `unknown_mailbox`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Update a webhook endpoint

`PATCH /v1/webhooks/{endpointId}`

TypeScript SDK method: `workwae.webhooks.update()`

The mailbox check runs whenever filters.message.mailboxIds or filters.accountIds changes.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Request body

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string (uri) | no | Example `"https://app.example.com/"`. |
| `description` | string \| null | no | Example `"Production"`. |
| `filters` | object | no |  |
| `filters.eventTypes` | ("account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test")[] | no | At most 100 items. |
| `filters.accountIds` | string (uuid)[] | no | At most 100 items. |
| `filters.message` | object | no |  |
| `filters.message.mailboxIds` | string (uuid)[] | no | At most 100 items. |
| `filters.message.mailboxRoles` | ("inbox" \| "sent" \| "drafts" \| "trash" \| "junk" \| "archive" \| "all" \| "important" \| "custom")[] | no | At most 9 items. |
| `filters.message.from` | string[] | no | At most 100 items. |
| `filters.message.to` | string[] | no | At most 100 items. |
| `filters.message.subjectContains` | string[] | no | At most 100 items. |
| `filters.message.hasAttachments` | boolean \| null | no |  |
| `filters.message.direction` | "inbound" \| "outbound" \| null | no |  |
| `isEnabled` | boolean | no |  |

### Responses

- **200** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes | Example `"c4e6a8b0-1d3f-4a5c-8e7b-9d1f3a5c7e9b"`. |
| `url` | string (uri) | yes | Example `"https://app.example.com/"`. |
| `description` | string \| null | yes | Example `"Production"`. |
| `filters` | object | yes |  |
| `filters.eventTypes` | ("account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test")[] | yes |  |
| `filters.accountIds` | string (uuid)[] | yes |  |
| `filters.message` | object | yes |  |
| `filters.message.mailboxIds` | string (uuid)[] | yes |  |
| `filters.message.mailboxRoles` | ("inbox" \| "sent" \| "drafts" \| "trash" \| "junk" \| "archive" \| "all" \| "important" \| "custom")[] | yes |  |
| `filters.message.from` | string[] | yes |  |
| `filters.message.to` | string[] | yes |  |
| `filters.message.subjectContains` | string[] | yes |  |
| `filters.message.hasAttachments` | boolean \| null | yes |  |
| `filters.message.direction` | "inbound" \| "outbound" \| null | yes |  |
| `isEnabled` | boolean | yes |  |
| `disabledReason` | string \| null | yes |  |
| `lastSuccessAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `failingSince` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `previousSecretExpiresAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `createdAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `https_required`, `mailbox_outside_accounts`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`, `unknown_account`, `unknown_mailbox`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Delete a webhook endpoint

`DELETE /v1/webhooks/{endpointId}`

TypeScript SDK method: `workwae.webhooks.delete()`

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Responses

- **204** OK (application/json, any)
- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Rotate the signing secret

`POST /v1/webhooks/{endpointId}/rotate-secret`

TypeScript SDK method: `workwae.webhooks.rotateSecret()`

Deliveries are signed with the new secret at once. For graceSeconds (default 86400, at most 604800) they also carry a signature by the old one, in the same webhook-signature header, so receivers can switch secrets without refusing a delivery; 0 stops the old secret at once. A rotation during another's grace ends that grace: only the secret it replaces is kept.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Request body

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `graceSeconds` | integer | no | 0 to 604800. Default `86400`. |

### Responses

- **200** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `secret` | string | yes |  |
| `previousSecretExpiresAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Send a test event

`POST /v1/webhooks/{endpointId}/test`

TypeScript SDK method: `workwae.webhooks.test()`

Queues one event of eventType for delivery to this endpoint only, whatever its filters, signed like any other, with "isTest": true in its body; its attempts show in the delivery log. It carries the sample data for its type unless data is given, which must match the type's data. Test events are never in the change feed.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Request body

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eventType` | "account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test" | no | Default `"webhook.test"`. |
| `accountId` | string (uuid) | no | Example `"6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b"`. |
| `data` | object | no |  |

### Responses

- **202** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eventId` | string | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`, `endpoint_disabled`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`, `unknown_account`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Read the delivery log

`GET /v1/webhooks/{endpointId}/attempts`

TypeScript SDK method: `workwae.webhooks.attempts()`

Delivery attempts to this endpoint, newest first: of the last 500 within 7 days, those matching the filters. A cursor stays valid while its attempt is in the log.

Required scope: `read`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |
| `limit` | query | integer | no | 1 to 500. Default `50`. |
| `cursor` | query | string | no | 1 to 512 characters. Example `"eyJ0eG5pZCI6IjQyIiwiaWQiOjEwMDF9"`. |
| `eventType` | query | "account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test" | no |  |
| `eventId` | query | string | no |  |
| `accountId` | query | string (uuid) | no | Example `"6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b"`. |
| `result` | query | "succeeded" \| "failed" | no |  |
| `since` | query | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |
| `until` | query | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |

### Responses

- **200** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | object[] | yes |  |
| `items[].id` | string (uuid) | yes | Example `"c4e6a8b0-1d3f-4a5c-8e7b-9d1f3a5c7e9b"`. |
| `items[].eventId` | string | yes |  |
| `items[].eventType` | "account.connected" \| "account.updated" \| "account.deleted" \| "account.reauth_required" \| "account.initialized" \| "account.purged" \| "mailbox.created" \| "mailbox.updated" \| "mailbox.deleted" \| "message.created" \| "message.updated" \| "message.deleted" \| "message.bounced" \| "message.classified" \| "message.opened" \| "message.clicked" \| "send.sent" \| "send.retrying" \| "send.failed" \| "send.rescheduled" \| "send.cancelled" \| "suppression.created" \| "calendar.initialized" \| "calendar.created" \| "calendar.updated" \| "calendar.deleted" \| "calendar_event.created" \| "calendar_event.updated" \| "calendar_event.deleted" \| "contacts.initialized" \| "contact.created" \| "contact.updated" \| "contact.deleted" \| "export.completed" \| "export.failed" \| "meeting_connection.connected" \| "meeting_connection.reauth_required" \| "booking.created" \| "booking.cancelled" \| "webhook.test" | yes |  |
| `items[].accountId` | string (uuid) \| null | yes | Example `"6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b"`. |
| `items[].attempt` | integer | yes |  |
| `items[].statusCode` | integer \| null | yes |  |
| `items[].error` | string \| null | yes |  |
| `items[].responseExcerpt` | string \| null | yes |  |
| `items[].durationMs` | integer | yes |  |
| `items[].isReplay` | boolean | yes |  |
| `items[].isTest` | boolean | yes |  |
| `items[].occurredAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `nextCursor` | string \| null | yes | Example `"eyJ0eG5pZCI6IjQyIiwiaWQiOjEwMDF9"`. |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `invalid_cursor`, `invalid_range`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Replay a time range

`POST /v1/webhooks/{endpointId}/replay`

TypeScript SDK method: `workwae.webhooks.replay()`

Queues every event in [since, until) that the endpoint would receive with its current filters again, with the same id and body as the first delivery and a fresh signature. Events the endpoint already has queued are not queued twice. Events past the tenant's eventRetentionDays cannot be replayed.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Request body (required)

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `until` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |

### Responses

- **202** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `queued` | integer | yes |  |
| `alreadyQueued` | integer | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `invalid_range`, `replay_range_too_large`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`, `endpoint_disabled`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Replay one event

`POST /v1/webhooks/{endpointId}/events/{eventId}/replay`

TypeScript SDK method: `workwae.webhooks.replayEvent()`

Queues the event again for this endpoint, whatever its filters, with the same id and body as the first delivery and a fresh signature; not twice if the endpoint already has it queued. Events past the tenant's eventRetentionDays cannot be replayed.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |
| `eventId` | path | string | yes |  |

### Responses

- **202** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `queued` | integer | yes |  |
| `alreadyQueued` | integer | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`, `event_not_found`
  - 409: `idempotency_key_in_progress`, `endpoint_disabled`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Count failed deliveries

`GET /v1/webhooks/{endpointId}/failed-deliveries/count`

TypeScript SDK method: `workwae.webhooks.countFailed()`

How many events replay-failed would queue now: those the endpoint gave up on (retries exhausted, or given up when it was disabled) that are still retained and not queued again, optionally only those created in [since, until).

Required scope: `read`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |
| `since` | query | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |
| `until` | query | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |

### Responses

- **200** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | integer | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `invalid_range`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`

## Replay failed deliveries

`POST /v1/webhooks/{endpointId}/replay-failed`

TypeScript SDK method: `workwae.webhooks.replayFailed()`

Queues every event the endpoint gave up on again, once each, optionally only those created in [since, until), with the same id and body as the first delivery and a fresh signature. The failed deliveries are replaced by the replays (their attempts stay in the delivery log), so calling again does not send them twice. Events past the tenant's eventRetentionDays cannot be replayed.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointId` | path | string (uuid) | yes | Example `"19a0c947-96ff-4eb7-98ff-bbd69758555c"`. |

### Request body

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |
| `until` | string (date-time) | no | Example `"2026-05-04T09:30:00.000Z"`. |

### Responses

- **202** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `queued` | integer | yes |  |
| `alreadyQueued` | integer | yes |  |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `invalid_range`, `replay_range_too_large`
  - 401: `unauthenticated`, `api_key_expired`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`
  - 404: `webhook_endpoint_not_found`
  - 409: `idempotency_key_in_progress`, `endpoint_disabled`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`
  - 429: `rate_limited`, `too_many_requests`
  - 500: `internal_error`
  - 503: `overloaded`
