Webhooks
List the webhook endpoints of the caller’s organisation and mode
GET /n/v1/webhook-endpoints
Never a secret, sealed or not, and never a capability snapshot.
Who can call it: API key or signed-in user.
Example request
Responses
Errors: 401, 403, 429, 503
Create a webhook endpoint (its signing secret is shown once)
POST /n/v1/webhook-endpoints
The endpoint belongs to the organisation and MODE of the caller’s token. Each pattern is stored with the capabilities the caller holds, and delivers only the types those read.
Who can call it: Signed-in user only: do this in the Yona app.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | At most 2048 characters. |
description | string | No | At most 200 characters. |
events | array of string | Yes | Event patterns: an exact type, a prefix.* wildcard, or *. 1 to 100 items. |
Example request
Responses
The endpoint and its whsec_… secret — no route returns the secret again.
Errors: 400, 401, 403, 409, 429, 503
Get a webhook endpoint (never its secret)
GET /n/v1/webhook-endpoints/{id}
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Update a webhook endpoint: URL, description or patterns; enable or disable it
PATCH /n/v1/webhook-endpoints/{id}
New patterns take the editor’s capability snapshot. enabled: false stops every open delivery of the endpoint; enabled: true clears its failure run.
Who can call it: Signed-in user only: do this in the Yona app.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | No | At most 2048 characters. |
description | string | No | At most 200 characters. |
events | array of string | No | Event patterns: an exact type, a prefix.* wildcard, or *. 1 to 100 items. |
enabled | boolean | No | false disables the endpoint (cause manual) and stops its open deliveries; true re-enables it and clears its failure run. (status itself is set by the server only.) |
upgradeVersions | boolean | No | Move the endpoint to the latest version of every event type. Every type is version 1 today, so this changes nothing yet. |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Delete a webhook endpoint
DELETE /n/v1/webhook-endpoints/{id}
Its open deliveries fail endpoint_disabled; its delivery log stays readable.
Who can call it: Signed-in user only: do this in the Yona app.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Rotate a webhook endpoint’s signing secret (shown once), with an overlap window
POST /n/v1/webhook-endpoints/{id}/rotate-secret
During the overlap every request carries two v1= signatures, one per secret, so a receiver can switch without downtime.
Who can call it: Signed-in user only: do this in the Yona app.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
overlapSeconds | integer | No | How long requests also carry a signature made with the previous secret. Default: 86400. Between 0 and 604800. |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Send a test ping, or a sample of one event type, to a webhook endpoint
POST /n/v1/webhook-endpoints/{id}/test
One delivery, "test": true, attempted once, never charged. A sample may be of any catalogue type the caller may read, whatever the endpoint subscribes to.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | No | Send a sample event of this type; when absent, a webhook_endpoint.pinged ping is sent. |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
List webhook event types, with whether the caller can subscribe to each
GET /n/v1/webhook-event-types
The webhook event catalogue: type, version, family, scope, status and the capability a subscription needs. subscribable says whether the caller holds it.
Who can call it: API key or signed-in user.
Example request
Responses
Errors: 401, 429, 503
List logged webhook events (last 30 days)
GET /n/v1/webhook-events
The events of the caller’s mode plus the organisation-scoped ones, each with its public data; only types the caller may read.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | Default: 1. At least 1. |
limit | query | integer | No | Default: 20. Between 1 and 100. |
type | query | string | No | |
from | query | string (date-time) | No | |
to | query | string (date-time) | No |
Example request
Responses
Errors: 400, 401, 403, 429, 503
Get a logged webhook event
GET /n/v1/webhook-events/{id}
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Replay a logged webhook event to one endpoint
POST /n/v1/webhook-events/{id}/redeliver
Also to an endpoint that did not receive it when it happened (disabled, or not subscribed). Never to an endpoint of a mode the event’s scope does not reach.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
endpointId | string (uuid) | Yes | One of the organisation’s endpoints in the caller’s mode. |
Example request
Responses
Errors: 400, 401, 403, 404, 409, 429, 503
List webhook deliveries (by endpoint, status or type)
GET /n/v1/webhook-deliveries
Only deliveries of types the caller’s own capabilities could subscribe to.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | Default: 1. At least 1. |
limit | query | integer | No | Default: 20. Between 1 and 100. |
endpointId | query | string (uuid) | No | |
status | query | string | No | One of pending | delivering | retrying | delivered | failed. |
type | query | string | No |
Example request
Responses
Errors: 400, 401, 403, 429, 503
Get a webhook delivery and its attempt log
GET /n/v1/webhook-deliveries/{id}
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
Errors: 400, 401, 403, 404, 429, 503
Redeliver a webhook delivery (one more attempt)
POST /n/v1/webhook-deliveries/{id}/redeliver
The stored bytes, to the endpoint’s current URL and secret. Appends an attempt; never rewrites one; never charged again.
Who can call it: API key or signed-in user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes |
Example request
Responses
Errors: 400, 401, 403, 404, 409, 429, 503