CherryMail
Skip to documentation
Developersv1
Search the CherryMail developer documentation
Developers/API reference/Webhooks
Webhooks

Create a subscription

Create a signed HTTPS webhook subscription. Save its one-time signing secret.

POST/api/v1/webhooks/
Permission webhook
Email events need mailbox access
Subscribing to message events also requires read permission, selected mailbox IDs, and current mailbox grants.

Request headers

Idempotency-Keystringrequired

A unique key for this intentional action. Reuse it only with the same request input.

Maximum 128 characters

Request body

Send JSON with Content-Type: application/json.

urlstringrequired

Public HTTPS callback URL on port 443. Private networks and redirects are blocked.

Maximum 2,048 characters

eventsstring[]required

Exact event names to subscribe to.

mailbox_idsinteger[]

Mailbox IDs covered by this subscription. Email events require current grants.

Default: []

Responses

200Success

Durable operation receipt with this endpoint’s result. Pending provisioning and SMTP acceptance are distinct from resource readiness and recipient delivery.

400Invalid request

Invalid input or missing idempotency key.

401Unauthenticated

Missing, expired, or revoked bearer credential.

403Forbidden

Wrong credential purpose, insufficient scope, or missing mailbox grant.

404Not found

Resource or message not found or unavailable to this integration.

409Conflict

Resource conflict, stale message reference, ambiguous submission, or idempotency conflict.

413Too large

Request or message exceeds the supported size.

429Rate limited

Rate limited. Honor Retry-After before retrying.

500Internal server error

Unexpected server error. Contact support with the request ID; inspect uncertain writes before retrying.

503Service unavailable

Integrations disabled or an upstream service unavailable.

See limits and errors for retry handling and the error envelope.