12 Endpunkte der Gruppe «Webhooks». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.
List webhooks
GET/v1/webhooks
Parameter
Name
Ort
Typ
Beschreibung
limit
query
integer
Page 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
cursor
query
string
The next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.
curl -X POST "https://api.sendtide.ch/v1/webhooks/wh_1/test" \
-H "Authorization: Bearer sk_test_…"
Antworten
Status
Beschreibung
200
ResultFelder der Antwort
delivered
boolean
status
integer
duration_ms
integer
error
string
Deliveries of a webhook, newest first
GET/v1/webhooks/{id}/deliveries
Parameter
Name
Ort
Typ
Beschreibung
id *
path
string
status
query
enum: pending | delivered | failed
limit
query
integer
Page 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
cursor
query
string
The next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.
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.
Parameter
Name
Ort
Typ
Beschreibung
id *
path
string
delivery_id *
path
integer
Beispiel
curl -X POST "https://api.sendtide.ch/v1/webhooks/wh_1/deliveries/42/retry" \
-H "Authorization: Bearer sk_test_…"
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.
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.
The 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
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.
Parameter
Name
Ort
Typ
Beschreibung
id *
path
string
cursor
query
string
The cursor of the start or the next_cursor of the previous answer; default: the start
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.