Waitlist open: get early access

API reference: Webhooks

12 endpoints of the Webhooks group.

List webhooks

GET/v1/webhooks

Parameters

NameInTypeDescription
limitqueryintegerPage size. The default and the maximum depend on the endpoint (emails 50 up to 500, received mail 50 up to 200, audit up to 200, the others 100 up to 500 or 1000). Default: 100
cursorquerystringThe next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.

Example

curl "https://api.sendtide.ch/v1/webhooks" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Webhooks
Response fields
dataarray<Webhook>
data[].idstring
data[].urlstring
data[].eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>
data[].enabledboolean
data[].disabled_reasonstring | null
data[].secretstringOnly in the answer to POST
data[].success_rate_24hnumber | null
data[].created_atstring (date-time)
next_cursorstring | null
event_typesarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>

Add a webhook

POST/v1/webhooks

The answer contains the signing secret, only this once.

Request body application/json

FieldTypeDescription
url *string (uri)https only
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>Empty for all events

Example

curl -X POST "https://api.sendtide.ch/v1/webhooks" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/sendtide","events":["email.delivered","email.bounced"]}'

Responses

StatusDescription
201 Added Webhook
Response fields
idstring
urlstring
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>
enabledboolean
disabled_reasonstring | null
secretstringOnly in the answer to POST
success_rate_24hnumber | null
created_atstring (date-time)

Change a webhook

PATCH/v1/webhooks/{id}

Parameters

NameInTypeDescription
id *pathstring

Request body application/json

FieldTypeDescription
urlstring
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>
enabledboolean

Example

curl -X PATCH "https://api.sendtide.ch/v1/webhooks/wh_1" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'

Responses

StatusDescription
200 Updated Webhook
Response fields
idstring
urlstring
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>
enabledboolean
disabled_reasonstring | null
secretstringOnly in the answer to POST
success_rate_24hnumber | null
created_atstring (date-time)

Remove a webhook

DELETE/v1/webhooks/{id}

Parameters

NameInTypeDescription
id *pathstring

Example

curl -X DELETE "https://api.sendtide.ch/v1/webhooks/wh_1" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
204 Removed

Send a test event now

POST/v1/webhooks/{id}/test

Parameters

NameInTypeDescription
id *pathstring

Example

curl -X POST "https://api.sendtide.ch/v1/webhooks/wh_1/test" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Result
Response fields
deliveredboolean
statusinteger
duration_msinteger
errorstring

Deliveries of a webhook, newest first

GET/v1/webhooks/{id}/deliveries

Parameters

NameInTypeDescription
id *pathstring
statusqueryenum: pending | delivered | failed
limitqueryintegerPage size. The default and the maximum depend on the endpoint (emails 50 up to 500, received mail 50 up to 200, audit up to 200, the others 100 up to 500 or 1000). Default: 100
cursorquerystringThe next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.

Example

curl "https://api.sendtide.ch/v1/webhooks/wh_1/deliveries" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Deliveries
Response fields
dataarray<WebhookDelivery>
data[].idinteger
data[].event_idstring | nullExample: evt_1042
data[].eventenum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received
data[].statusenum: pending | delivered | failed
data[].sourceenum: event | retry | replay
data[].attemptsinteger
data[].last_statusinteger | null
data[].last_errorstring | null
data[].duration_msinteger | null
data[].next_attempt_atstring | null (date-time)
data[].created_atstring (date-time)
next_cursorstring | null

Send the event of a delivery again

POST/v1/webhooks/{id}/deliveries/{delivery_id}/retry

Creates a new delivery with the same event (same event id in the payload). A delivery that is still pending answers 409 delivery_pending, a disabled webhook 409 webhook_disabled.

Parameters

NameInTypeDescription
id *pathstring
delivery_id *pathinteger

Example

curl -X POST "https://api.sendtide.ch/v1/webhooks/wh_1/deliveries/42/retry" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
202 Queued
Response fields
idintegerId of the new delivery
statusenum: pending
404 Error in the usual format, errors and limits
409 Error in the usual format, errors and limits

Send the events of a time range again

POST/v1/webhooks/{id}/replay

Queues the mail events of the range from to to again (at most 7 days back, at most 50'000 events, else 422 too_many_events), limited to the webhook's own event types and to events if given. Every event gets a new delivery with its old event id. An event that still has a pending delivery is skipped, so repeating a replay sends nothing twice. email.received and email.unsubscribed cannot be replayed.

Parameters

NameInTypeDescription
id *pathstring

Request body application/json

FieldTypeDescription
from *string (date-time)
to *string (date-time)
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>

Example

curl -X POST "https://api.sendtide.ch/v1/webhooks/wh_1/replay" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-11-28T00:00:00Z","to":"2026-11-29T00:00:00Z","events":["email.bounced"]}'

Responses

StatusDescription
202 Queued
Response fields
queuedinteger
409 Error in the usual format, errors and limits
422 Error in the usual format, errors and limits

Start the CLI listener of the key

POST/v1/webhooks/listen

For sendtide listen: receive the mail events of the account while the CLI runs, without a public webhook endpoint. Every API key has one listener; starting it again keeps its id and secret (the local app keeps verifying) and receives the events recorded from now on. It sees the mail of its own environment only (a test key the mail of test keys). The listener is independent of the webhooks: it creates no deliveries and changes nothing for them. It expires 5 minutes after the last poll. Needs an API key (any scope), not a dashboard session. email.received and email.unsubscribed are not available to listeners.

Request body application/json

FieldTypeDescription
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>Empty or missing: all mail events

Example

curl -X POST "https://api.sendtide.ch/v1/webhooks/listen" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

StatusDescription
200 The listener WebhookListener
Response fields
idstringExample: wl_8kq2m4bt
secretstringwhsec_…, the same on every start of this key's listener
eventsarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>Empty: all mail events
cursorstringPass it to the first poll
expires_atstring (date-time)
event_typesarray<enum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received>The events a listener can receive
activebooleanThe listener was still polled by another process with this key (a running sendtide listen): it keeps its start and, without events, its events; do not end it
403 Error in the usual format, errors and limits
422 Error in the usual format, errors and limits

Wait for the next events of the CLI listener

GET/v1/webhooks/listen/{id}/events

Long poll: the events after cursor, oldest first, at most 100, in the same body as a webhook delivery (sign them with the listener's secret to forward them). Waits up to wait seconds for the first event and answers with an empty data otherwise. Poll again with next_cursor; every poll keeps the listener alive. At most two open polls per key (429). 410 listener_expired after 5 minutes without a poll or after DELETE.

Parameters

NameInTypeDescription
id *pathstring
cursorquerystringThe cursor of the start or the next_cursor of the previous answer; default: the start
waitqueryintegerSeconds to wait for the first event Default: 20

Example

curl "https://api.sendtide.ch/v1/webhooks/listen/wl_8kq2m4bt/events" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Events
Response fields
dataarray<WebhookEvent>
data[].idstringExample: evt_42
data[].typeenum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received
data[].created_atstring (date-time)
data[].dataobjectMail events: the event's fields plus email_id, from, to, subject, tags, metadata, stream
next_cursorstring
404 Error in the usual format, errors and limits
410 Error in the usual format, errors and limits
422 Error in the usual format, errors and limits
429 Error in the usual format, errors and limits

Stop the CLI listener

DELETE/v1/webhooks/listen/{id}

Ends the listener at once (the CLI does it on exit). Its secret stays for the next start.

Parameters

NameInTypeDescription
id *pathstring

Example

curl -X DELETE "https://api.sendtide.ch/v1/webhooks/listen/wh_1" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
204 Stopped
404 Error in the usual format, errors and limits

An event of a sent or received mail

POSTyour endpoint

Signed with Sendtide-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>" with the webhook secret>. Reject signatures older than five minutes. Answer with any 2xx; otherwise Sendtide retries for 24 hours.

Parameters

NameInTypeDescription
Sendtide-Signature *headerstringt=<unix seconds>,v1=<hex HMAC-SHA256>

Request body application/json

FieldTypeDescription
idstringExample: evt_42
typeenum: email.queued | email.sent | email.delivered | email.delayed | email.opened | email.machine_opened | email.clicked | email.bounced | email.complained | email.rejected | email.failed | email.suppressed | email.canceled | email.held | email.unsubscribed | email.received
created_atstring (date-time)
dataobject

Example

curl -X POST "https://your-server.example/webhooks/sendtide" \
  -H "Content-Type: application/json" \
  -H "Sendtide-Signature: t=1795000000,v1=…" \
  -d '{"id":"evt_42","type":"email.delivered","created_at":"2026-12-01T08:00:03Z","data":{"email_id":"msg_8kq2m4bt","from":"hello@example.ch","to":["anna@example.com"],"subject":"Willkommen","tags":[],"metadata":{},"stream":"transactional"}}'

Responses

StatusDescription
2xx Any 2xx confirms the delivery.