API reference
Webhooks
Outgoing webhooks and the event feed.
Account event feed
GET/api/v1/accounts/{id}/events
GET /events?after=<seq>&type=a,b&limit=n — the outbox as a feed, for integrations that poll.
Parameters
| Name | In |
|---|---|
id | path |
after | query |
limit | query |
type | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreEvent nextinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
List the account's webhooks
GET/api/v1/accounts/{id}/webhooks
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type itemsarray of StoreWebhookEndpoint - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Add an account webhook
POST/api/v1/accounts/{id}/webhooks
Parameters
| Name | In |
|---|---|
id | path |
Request body
| Field | Type |
|---|---|
description | string |
enabled | boolean |
events | array of string |
url | string |
Responses
- 201 Created
Body
Field Type secretstring webhookStoreWebhookEndpoint - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 409 Conflict: too-many
- 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
- 500 Internal Server Error: internal
Delete an account webhook
DELETE/api/v1/accounts/{id}/webhooks/{wid}
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Get an account webhook
GET/api/v1/accounts/{id}/webhooks/{wid}
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
Responses
- 200 OK
Body
Field Type account_idstring consecutive_failuresalwaysinteger created_atalwaysinteger descriptionalwaysstring disabled_reasonstring enabledalwaysboolean eventsalwaysarray of string idalwaysstring owner_typealwaysstring updated_atalwaysinteger urlalwaysstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Update an account webhook
PATCH/api/v1/accounts/{id}/webhooks/{wid}
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
Request body
| Field | Type |
|---|---|
description | string |
enabled | boolean |
events | array of string |
url | string |
Responses
- 200 OK
Body
Field Type account_idstring consecutive_failuresalwaysinteger created_atalwaysinteger descriptionalwaysstring disabled_reasonstring enabledalwaysboolean eventsalwaysarray of string idalwaysstring owner_typealwaysstring updated_atalwaysinteger urlalwaysstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
- 500 Internal Server Error: internal
List an account webhook's deliveries
GET/api/v1/accounts/{id}/webhooks/{wid}/deliveries
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
limit | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreWebhookDelivery - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Redeliver an account webhook delivery
POST/api/v1/accounts/{id}/webhooks/{wid}/deliveries/{did}/redeliver
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
did | path |
Responses
- 202 Accepted (runs in the background)
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Rotate an account webhook's secret
POST/api/v1/accounts/{id}/webhooks/{wid}/rotate-secret
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
Responses
- 200 OK
Body
Field Type secretstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Send a test event to an account webhook
POST/api/v1/accounts/{id}/webhooks/{wid}/test
Queues a webhook.ping to this endpoint only, whatever its event list.
Parameters
| Name | In |
|---|---|
id | path |
wid | path |
Responses
- 202 Accepted (runs in the background)
Body
Field Type event_idstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Events an account webhook can receive
GET/api/v1/accounts/{id}/webhooks/events
Parameters
| Name | In |
|---|---|
id | path |
Responses
- 200 OK
Body
Field Type itemsarray of WebhooksEventType - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
Server event feed
GET/api/v1/events
GET /events?after=<seq>&type=a,b&limit=n — the outbox as a feed, for integrations that poll.
Parameters
| Name | In |
|---|---|
after | query |
limit | query |
type | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreEvent nextinteger - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
List server webhooks
GET/api/v1/webhooks
Responses
- 200 OK
Body
Field Type itemsarray of StoreWebhookEndpoint - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 500 Internal Server Error: internal
Add a server webhook
POST/api/v1/webhooks
Request body
| Field | Type |
|---|---|
description | string |
enabled | boolean |
events | array of string |
url | string |
Responses
- 201 Created
Body
Field Type secretstring webhookStoreWebhookEndpoint - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 409 Conflict: too-many
- 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
- 500 Internal Server Error: internal
Delete a server webhook
DELETE/api/v1/webhooks/{wid}
Parameters
| Name | In |
|---|---|
wid | path |
Responses
- 204 Done, no content
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Get a server webhook
GET/api/v1/webhooks/{wid}
Parameters
| Name | In |
|---|---|
wid | path |
Responses
- 200 OK
Body
Field Type account_idstring consecutive_failuresalwaysinteger created_atalwaysinteger descriptionalwaysstring disabled_reasonstring enabledalwaysboolean eventsalwaysarray of string idalwaysstring owner_typealwaysstring updated_atalwaysinteger urlalwaysstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Update a server webhook
PATCH/api/v1/webhooks/{wid}
Parameters
| Name | In |
|---|---|
wid | path |
Request body
| Field | Type |
|---|---|
description | string |
enabled | boolean |
events | array of string |
url | string |
Responses
- 200 OK
Body
Field Type account_idstring consecutive_failuresalwaysinteger created_atalwaysinteger descriptionalwaysstring disabled_reasonstring enabledalwaysboolean eventsalwaysarray of string idalwaysstring owner_typealwaysstring updated_atalwaysinteger urlalwaysstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
- 500 Internal Server Error: internal
List a server webhook's deliveries
GET/api/v1/webhooks/{wid}/deliveries
Parameters
| Name | In |
|---|---|
wid | path |
limit | query |
Responses
- 200 OK
Body
Field Type itemsarray of StoreWebhookDelivery - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Redeliver a server webhook delivery
POST/api/v1/webhooks/{wid}/deliveries/{did}/redeliver
Parameters
| Name | In |
|---|---|
wid | path |
did | path |
Responses
- 202 Accepted (runs in the background)
- 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Rotate a server webhook's secret
POST/api/v1/webhooks/{wid}/rotate-secret
Parameters
| Name | In |
|---|---|
wid | path |
Responses
- 200 OK
Body
Field Type secretstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Send a test event to a server webhook
POST/api/v1/webhooks/{wid}/test
Queues a webhook.ping to this endpoint only, whatever its event list.
Parameters
| Name | In |
|---|---|
wid | path |
Responses
- 202 Accepted (runs in the background)
Body
Field Type event_idstring - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
- 404 Not Found: not-found
- 500 Internal Server Error: internal
Event catalog
GET/api/v1/webhooks/events
Responses
- 200 OK
Body
Field Type itemsarray of WebhooksEventType - 401 Unauthorized: no session, or an invalid or expired token
- 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)