Skip to main content
POST
Create a webhook subscription

Authorizations

Authorization
string
header
required

Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.

Headers

Idempotency-Key
string

Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.

Maximum string length: 255
Example:

"webhooks-create-20260424-001"

Body

application/json
event_types
enum<string>[]
required

At least one event type must be provided.

Minimum array length: 1

Event types a webhook may subscribe to. sendmux.test is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.

Available options:
message.delivered,
message.bounced,
message.complained,
message.rejected,
message.delivery_delayed,
message.received,
message.received.spam,
sendmux.test
Example:
url
string<uri>
required

HTTPS endpoint that will receive event POSTs. Must be https:// — plain HTTP is rejected.

Example:

"https://hooks.acme.com/sendmux"

enabled
boolean

Defaults to true.

Example:

true

filters
object

Optional delivery scope. Omit or pass an empty mailbox_ids array to receive matching events for all mailboxes in the team.

name
string

Optional human-friendly label (max 255 chars). Surfaced in dashboard list/detail views.

Required string length: 1 - 255
Example:

"Acme inbound forwarder"

Response

Subscription created, including the signing secret. The response carries a Location header pointing at the canonical GET URL for the new subscription.

meta
object
required
ok
enum<boolean>
required
Available options:
true
data
object
required