API reference
Webhooks
Register an endpoint that is told about delivery events.
Register a webhook endpoint.
POST/v1/webhooks
Needs an API key with the webhook:manage scope. Operation createDeveloperWebhook
The URL must be https and resolve to public addresses only. The response carries the signing secret, this once.
Request body
CreateWebhookRequestCreateWebhookRequest
urlstringrequiredAn https URL without credentials that resolves to public addresses.
format: uridescriptionstringoptionallength 0 to 200event_typesWebhookEventType[]optionalLeave out or empty to receive every event type.
Responses
- 201WebhookCreated
The new endpoint, with its signing secret. The secret cannot be read again.
object
dataWebhookrequiredA webhook endpoint.
Show fields (8)Fields (8)
iduuidrequiredurlstringrequiredformat: uridescriptionstringrequiredevent_typesWebhookEventType[]requiredThe event types delivered. Empty means every type.
enabledbooleanrequiredcreated_atdate-timerequiredlast_event_statusstringrequiredcan be nullThe state of the newest event queued for the endpoint. Null when nothing has been sent yet, which is always the case in the response to creating one.
One ofpendingdeliveredfailedsigning_secretstringoptionalThe secret deliveries are signed with. Returned once, in the response to creating the endpoint, and never again.
- 400BadRequest
invalid_json: the body is not one JSON object, or has a field this endpoint does not accept.
The body is the error envelope.
- 401InvalidApiKey
unauthenticated: no API key was sent.invalid_api_key: the key is unknown, revoked or expired.
The body is the error envelope.
- 403InsufficientScope
insufficient_scope: the API key does not hold the scope this operation needs.account_suspended: the organisation is suspended; none of its keys work until that is lifted.account_closed: the organisation has been closed; none of its keys will work again.
The body is the error envelope.
- 409WebhookLimitReached
webhook_limit_reached: the organisation already has the maximum number of endpoints.
The body is the error envelope.
- 422ValidationFailed
validation_failed:detailsnames each invalid field.
The body is the error envelope.
- 429RateLimited
rate_limited: too many requests. WaitRetry-Afterseconds.
Retry-Afterheader: How many seconds to wait before trying again.RateLimit-Limitheader: How many requests the limit that stopped this one allows per period.RateLimit-Remainingheader: How many requests are left in the current period.
The body is the error envelope.
Example
curl -X POST https://api.cirrusmail.example/v1/webhooks \
-H "Authorization: Bearer $CIRRUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://shop.example/hooks/cirrus",
"description": "Order emails",
"event_types": [
"email.delivered",
"email.bounced"
]
}'{
"data": {
"id": "b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11",
"url": "https://shop.example/hooks/cirrus",
"description": "string",
"event_types": [
"email.sent"
],
"enabled": false,
"created_at": "2026-01-15T09:30:00Z",
"last_event_status": "pending",
"signing_secret": "whsec_…"
}
}Set CIRRUS_API_KEY to your key. The values are examples.