Skip to the documentation
API

Webhooks

Every operation in this group: what it accepts, what it returns and the errors it can answer with.

Operations

Where to call when mail arrives or goes out.

GET/webhooks

List webhook endpoints

Scopeswebhooks:readReads

A page of endpoints, newest first. Follow nextCursor while hasMore is true to read them all.

Requires the webhooks:read scope.

Query parameters

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The previous page's nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400 invalid_cursor.

qstring

Searches the host and the whole URL, the description, the id, the reason it was disabled, and every event, address and domain it names. Every word has to appear in one of them, ignoring case and accents, and when nothing matches exactly, close spellings are returned instead. Leave it out for every row. Paging walks the matches in the same order, so keep the same q on every page.

Up to 200 characters

Returns

A page of endpoints. Secrets are never echoed.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.list()webhooks.listAll()webhooks.iterate()
Python
webhooks.list()webhooks.list_all()webhooks.iterate()
Ruby
webhooks.listwebhooks.list_allwebhooks.iterate
PHP
webhooks->listwebhooks->listAllwebhooks->iterate
Go
Webhooks.ListWebhooks.ListAllWebhooks.Iterate
Java
webhooks().listwebhooks().listAllwebhooks().iterate
C#
Webhooks.ListAsyncWebhooks.ListAllAsyncWebhooks.IterateAsync
CLI
nextmail webhooks list
MCP
getWebhooklistWebhooks

POST/webhooks

Register a webhook endpoint

Scopeswebhooks:writeChanges data
Asks for a verification code

Returns the signing secret ONCE. https only, and private or loopback hosts are refused. A webhook is a server-side fetch to an address you supply, which is the shape of an SSRF.

Requires the webhooks:write scope.

Request body

urlstringRequired

The https receiver URL. Another scheme or a blocked host is 422 invalid_webhook_url. Stored in normalised form, so the url read back can differ cosmetically.

Not emptyFormaturi
eventTypesstring[]

Empty means the default set: the email events. Events outside it, such as email.replied, domain.*, suppression.*, file.* and form.*, have to be named. A webhook limited to particular addresses or domains never receives form.* events, because sign-ups belong to the whole workspace.

Up to 57 itemsOne of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
descriptionstring

Free text note, at most 200 characters.

Up to 200 characters
addressAllowliststring[]

Single addresses this endpoint hears about. Empty on both lists means every address this workspace owns.

Up to 50 items
domainAllowliststring[]

Whole domains this endpoint hears about, including addresses added to them later.

Up to 25 items
includeContentboolean

True to put the message itself into every email.received event this endpoint gets, as data.content: the text, the HTML up to 512 KiB, and each attachment with a link that downloads it for an hour without a credential. The receiver then needs no second call to read the mail. The content is read when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

includeRawboolean

True to give every email.received event this endpoint gets a link to the message source, as data.raw with url, size, source and expiresAt: the bytes exactly as they arrived when the address keeps originals, and otherwise the message rebuilt the way a mail app downloads it. The link needs no credential, works for an hour from each attempt and stops working once the endpoint is switched off or stops including the source. It is made when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

retryPolicystring

How long a failed delivery is tried again. standard, the default, tries it up to 8 times over about 27 and a half hours: as it happens, then after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. extended tries it up to 16 times over about 3 days: as it happens, then after 1 minute, then after twice the last wait each time until the wait reaches 12 hours, then every 12 hours. The policy is read at every attempt, so a change also applies to events already waiting for a retry. Either way an event whose last attempt fails is kept as a dead letter for 30 days.

One of"standard""extended"

Returns

Created, with the secret.

Errors

403

The key lacks the scope, or may not send as that address.

step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code with POST /security/step-up, send it to POST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.

The errors every operation can return400401404422429500Error catalog

Also available in

TypeScript
webhooks.create()
Python
webhooks.create()
Ruby
webhooks.create
PHP
webhooks->create
Go
Webhooks.Create
Java
webhooks().create
C#
Webhooks.CreateAsync
CLI
nextmail webhooks create
MCP
createWebhook

GET/webhooks/deliveries

List deliveries across endpoints

Scopeswebhooks:readReads

The delivery log of every endpoint in the workspace, or of the ones endpointIds names, newest first and a page at a time: the all-endpoints Deliveries tab of the app. Each row carries endpointId. Nothing is pruned, so following nextCursor while hasMore is true reaches the first delivery. status, since and until narrow it exactly as they narrow one endpoint's log. The body that was sent is not here; read it with GET /webhooks/{id}/deliveries/{deliveryId}.

Requires the webhooks:read scope.

Query parameters

endpointIdsstring

Comma-separated endpoint ids, at most 50. Left out, every endpoint in the workspace.

statusstring

failed for the attempts that did not get a 2xx, the "only failed" view of the Deliveries tab, or delivered for the ones that did.

One of"delivered""failed"
sincestring

Only rows at or after this instant, ISO 8601. One that does not parse is a 400 invalid_parameter.

Formatdate-time
untilstring

Only rows before this instant. It has to be later than since.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The nextCursor of the previous page, which is a delivery id. Keyset, not offset, and it holds under every filter: send the same filters with each page. A cursor that names no delivery in this list is a 400 invalid_cursor.

Returns

A page of deliveries, newest first.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listWorkspaceDeliveries()webhooks.listAllWorkspaceDeliveries()webhooks.iterateWorkspaceDeliveries()
Python
webhooks.list_workspace_deliveries()webhooks.list_all_workspace_deliveries()webhooks.iterate_workspace_deliveries()
Ruby
webhooks.list_workspace_deliverieswebhooks.list_all_workspace_deliverieswebhooks.iterate_workspace_deliveries
PHP
webhooks->listWorkspaceDeliverieswebhooks->listAllWorkspaceDeliverieswebhooks->iterateWorkspaceDeliveries
Go
Webhooks.ListWorkspaceDeliveriesWebhooks.ListAllWorkspaceDeliveriesWebhooks.IterateWorkspaceDeliveries
Java
webhooks().listWorkspaceDeliverieswebhooks().listAllWorkspaceDeliverieswebhooks().iterateWorkspaceDeliveries
C#
Webhooks.ListWorkspaceDeliveriesAsyncWebhooks.ListAllWorkspaceDeliveriesAsyncWebhooks.IterateWorkspaceDeliveriesAsync
CLI
nextmail webhooks list-workspace-deliveries
MCP
listWebhookDeliveries

GET/webhooks/activity

List webhook activity

Scopeswebhooks:readReads

The audit log of the workspace's webhooks, newest first: created, updated, enabled, disabled, auto_disabled, secret_rotated, tested, replayed and removed, whether the change came from the app, from a key over this API, or from Nextmail itself. actor says who, as @username for a person or API key <name> for a key. Nothing is pruned, and a removed endpoint keeps its history. endpointIds, since and until narrow it.

Requires the webhooks:read scope.

Query parameters

endpointIdsstring

Comma-separated endpoint ids, at most 50. Left out, every endpoint in the workspace.

sincestring

Only rows at or after this instant, ISO 8601. One that does not parse is a 400 invalid_parameter.

Formatdate-time
untilstring

Only rows before this instant. It has to be later than since.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The previous page's nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400 invalid_cursor.

Returns

A page of changes, newest first.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listWorkspaceActivity()webhooks.listAllWorkspaceActivity()webhooks.iterateWorkspaceActivity()
Python
webhooks.list_workspace_activity()webhooks.list_all_workspace_activity()webhooks.iterate_workspace_activity()
Ruby
webhooks.list_workspace_activitywebhooks.list_all_workspace_activitywebhooks.iterate_workspace_activity
PHP
webhooks->listWorkspaceActivitywebhooks->listAllWorkspaceActivitywebhooks->iterateWorkspaceActivity
Go
Webhooks.ListWorkspaceActivityWebhooks.ListAllWorkspaceActivityWebhooks.IterateWorkspaceActivity
Java
webhooks().listWorkspaceActivitywebhooks().listAllWorkspaceActivitywebhooks().iterateWorkspaceActivity
C#
Webhooks.ListWorkspaceActivityAsyncWebhooks.ListAllWorkspaceActivityAsyncWebhooks.IterateWorkspaceActivityAsync
CLI
nextmail webhooks list-workspace-activity
MCP
listWebhookActivity

PATCH/webhooks/{id}

Update a webhook endpoint

Scopeswebhooks:writeChanges data
Asks for a verification code

Requires the webhooks:write scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Request body

urlstring

Replacement https URL, checked against the same host rules as create.

Not emptyFormaturi
eventTypesstring[]

Complete replacement subscription set. [] means the default email.* set.

Up to 57 itemsOne of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
descriptionstring

Replacement note of at most 200 characters, or null to clear it.

Can be nullUp to 200 characters
enabledboolean

False stops deliveries. True resumes them and resets consecutiveFailures.

addressAllowliststring[]

Single addresses this endpoint hears about. Empty on both lists means every address this workspace owns.

Up to 50 items
domainAllowliststring[]

Whole domains this endpoint hears about, including addresses added to them later.

Up to 25 items
includeContentboolean

True to put the message itself into every email.received event this endpoint gets, as data.content: the text, the HTML up to 512 KiB, and each attachment with a link that downloads it for an hour without a credential. The receiver then needs no second call to read the mail. The content is read when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

includeRawboolean

True to give every email.received event this endpoint gets a link to the message source, as data.raw with url, size, source and expiresAt: the bytes exactly as they arrived when the address keeps originals, and otherwise the message rebuilt the way a mail app downloads it. The link needs no credential, works for an hour from each attempt and stops working once the endpoint is switched off or stops including the source. It is made when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

retryPolicystring

How long a failed delivery is tried again. standard, the default, tries it up to 8 times over about 27 and a half hours: as it happens, then after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. extended tries it up to 16 times over about 3 days: as it happens, then after 1 minute, then after twice the last wait each time until the wait reaches 12 hours, then every 12 hours. The policy is read at every attempt, so a change also applies to events already waiting for a retry. Either way an event whose last attempt fails is kept as a dead letter for 30 days.

One of"standard""extended"

Returns

Saved.

Errors

403

The key lacks the scope, or may not send as that address.

step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code with POST /security/step-up, send it to POST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.

The errors every operation can return400401404422429500Error catalog

Also available in

TypeScript
webhooks.update()
Python
webhooks.update()
Ruby
webhooks.update
PHP
webhooks->update
Go
Webhooks.Update
Java
webhooks().update
C#
Webhooks.UpdateAsync
CLI
nextmail webhooks update
MCP
updateWebhook

DELETE/webhooks/{id}

Delete a webhook endpoint

Scopeswebhooks:writeDeletes

Requires the webhooks:write scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Returns

Deleted.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.delete()
Python
webhooks.delete()
Ruby
webhooks.delete
PHP
webhooks->delete
Go
Webhooks.Delete
Java
webhooks().delete
C#
Webhooks.DeleteAsync
CLI
nextmail webhooks delete
MCP
deleteWebhook

POST/webhooks/{id}/rotate-secret

Rotate the signing secret

Scopeswebhooks:writeDeletes

Returns the new secret once. For 24 hours every delivery carries a second v1 signature made with the old secret, so a receiver that still holds it keeps verifying while it is given the new one, and previousSecretExpiresAt says when that ends. Rotating again within those hours keeps every secret retired in the window signing until its own 24 hours are up.

Requires the webhooks:write scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Returns

Rotated, with the new secret.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.rotateSecret()
Python
webhooks.rotate_secret()
Ruby
webhooks.rotate_secret
PHP
webhooks->rotateSecret
Go
Webhooks.RotateSecret
Java
webhooks().rotateSecret
C#
Webhooks.RotateSecretAsync
CLI
nextmail webhooks rotate-secret
MCP
rotateWebhookSecret

POST/webhooks/{id}/test

Send a synthetic event

Scopeswebhooks:writeSends mail

Proves an endpoint is reachable and its signature check correct before any real mail depends on it. Returns what came back. A 404 from your server is the useful answer.

Requires the webhooks:write scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Returns

The delivery result.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.test()
Python
webhooks.test()
Ruby
webhooks.test
PHP
webhooks->test
Go
Webhooks.Test
Java
webhooks().test
C#
Webhooks.TestAsync
CLI
nextmail webhooks test
MCP
testWebhook

GET/webhooks/{id}/deliveries

List deliveries

Scopeswebhooks:readReads

Every attempt, newest first and a page at a time, each with its response code, duration and attempt number. Nothing is dropped from the log, so following nextCursor while hasMore is true reaches the endpoint's first delivery. One event can appear several times: on the standard retry policy a delivery is tried up to 8 times, as it happens and then after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, about 27 and a half hours in all, on extended up to 16 times over about 3 days, and a replay adds another row. eventId is the event, the same on every retry and replay of it, while attempt is the try, so a receiver reading this can tell a repeat from a new event. nextAttemptAt is when the automatic retry that follows an attempt is due, and null once none is waiting. status keeps only failed or only delivered attempts, the "only failed" view of the app, and since and until keep a window; the cursor stays valid under every filter as long as each page sends the same ones. GET /webhooks/deliveries reads every endpoint at once.

Requires the webhooks:read scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Query parameters

statusstring

failed for the attempts that did not get a 2xx, the "only failed" view of the Deliveries tab, or delivered for the ones that did.

One of"delivered""failed"
sincestring

Only rows at or after this instant, ISO 8601. One that does not parse is a 400 invalid_parameter.

Formatdate-time
untilstring

Only rows before this instant. It has to be later than since.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The nextCursor of the previous page, which is a delivery id. Keyset, not offset, and it holds under every filter: send the same filters with each page. A cursor that names no delivery in this list is a 400 invalid_cursor.

Returns

A page of deliveries, newest first.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listDeliveries()webhooks.listAllDeliveries()webhooks.iterateDeliveries()
Python
webhooks.list_deliveries()webhooks.list_all_deliveries()webhooks.iterate_deliveries()
Ruby
webhooks.list_deliverieswebhooks.list_all_deliverieswebhooks.iterate_deliveries
PHP
webhooks->listDeliverieswebhooks->listAllDeliverieswebhooks->iterateDeliveries
Go
Webhooks.ListDeliveriesWebhooks.ListAllDeliveriesWebhooks.IterateDeliveries
Java
webhooks().listDeliverieswebhooks().listAllDeliverieswebhooks().iterateDeliveries
C#
Webhooks.ListDeliveriesAsyncWebhooks.ListAllDeliveriesAsyncWebhooks.IterateDeliveriesAsync
CLI
nextmail webhooks list-deliveries
MCP
listWebhookDeliveries

GET/webhooks/{id}/deliveries/{deliveryId}

Retrieve a delivery

Scopeswebhooks:readReads

One attempt in full: payload is the exact JSON body that was POSTed, responseBody the first 2,000 characters your server answered, attempts every try of the same event on this endpoint, oldest first, and nextAttemptAt when the next automatic retry of the event is due. replayRefusal is null when a replay would be accepted, and otherwise carries the code and message the replay operation would answer with, one of webhook_disabled, event_not_subscribed, event_out_of_scope, delivery_not_replayable or retry_in_progress, the last while an automatic retry of the same event is being sent. A delivery that belongs to another endpoint is a 404, the same as one that never existed. A key narrowed to particular addresses or domains may read a delivery only on an endpoint whose own allowlists sit inside what the key holds, where holding one address never covers its whole domain, because the body names the addresses the event is about; any other is 422 capability_unsupported on addressAllowlist. Over OAuth only the workspace owner, or a member whose role reaches every address, may read one, and any other member's token is refused with owner_only. That member's token is held to the domains the workspace has now, so it reads only a delivery of an endpoint with allowlists, and one with none is 422 capability_unsupported for it too. In the app that member reads the deliveries of every endpoint, and so does an MCP client they connected with every address.

Requires the webhooks:read scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

deliveryIdstringRequired

A delivery id, whd_ followed by 24 hex characters.

Returns

The delivery.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.getDelivery()
Python
webhooks.get_delivery()
Ruby
webhooks.get_delivery
PHP
webhooks->getDelivery
Go
Webhooks.GetDelivery
Java
webhooks().getDelivery
C#
Webhooks.GetDeliveryAsync
CLI
nextmail webhooks get-delivery
MCP
getWebhookDelivery

POST/webhooks/{id}/deliveries/{deliveryId}/replay

Replay a delivery

Scopeswebhooks:writeSends mail

Sends the stored event again, once, right now, and answers with how it went. The body carries the same id, type, createdAt and data as the original, so a receiver that drops ids it has already handled treats it as the same event. Only the signature is new, because every POST is signed at the moment it is sent. It works on a delivered attempt as well as a failed one, which is how a receiver that lost its own copy is brought back in step. The replay is recorded as a new delivery, attempt 1 of 1, and is never retried automatically. Before it is sent, the automatic retries of the same event that have not started are paused: when the replay is delivered they stay cancelled, and when it fails they resume on their schedule. It answers 200 whatever your server said, so read delivery.status. Refused with a 409 when the endpoint is switched off (webhook_disabled), no longer listens for the event (event_not_subscribed), no longer covers the address the event is about (event_out_of_scope), the attempt has no stored event to send (delivery_not_replayable), an automatic retry of the same event is being sent at that moment (retry_in_progress), or another replay of the same event is still being sent (replay_in_progress). In the last two cases nothing is sent, so two copies never go out at once, even when two replays arrive at the same instant. A replay that is delivered closes the dead letter of the event, if it has one. This sends one event; POST /webhooks/{id}/dead-letters/replay sends every event whose last attempt failed, up to 100 a call.

Requires the webhooks:write scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

deliveryIdstringRequired

Any attempt of the event to send again, whd_ followed by 24 hex characters.

Returns

The replay and what your server answered.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.replayDelivery()
Python
webhooks.replay_delivery()
Ruby
webhooks.replay_delivery
PHP
webhooks->replayDelivery
Go
Webhooks.ReplayDelivery
Java
webhooks().replayDelivery
C#
Webhooks.ReplayDeliveryAsync
CLI
nextmail webhooks replay-delivery
MCP
replayWebhookDelivery

GET/webhooks/{id}/activity

List one webhook's activity

Scopeswebhooks:readReads

The audit log of one endpoint, newest first, the Activity tab of the endpoint in the app. It answers for a removed endpoint too, because its history is kept; an id with neither an endpoint nor any history in this workspace is a 404.

Requires the webhooks:read scope.

Path parameters

idstringRequired

Endpoint id, whe_ followed by 24 hex characters.

Query parameters

sincestring

Only rows at or after this instant, ISO 8601. One that does not parse is a 400 invalid_parameter.

Formatdate-time
untilstring

Only rows before this instant. It has to be later than since.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The previous page's nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400 invalid_cursor.

Returns

A page of changes, newest first.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listActivity()webhooks.listAllActivity()webhooks.iterateActivity()
Python
webhooks.list_activity()webhooks.list_all_activity()webhooks.iterate_activity()
Ruby
webhooks.list_activitywebhooks.list_all_activitywebhooks.iterate_activity
PHP
webhooks->listActivitywebhooks->listAllActivitywebhooks->iterateActivity
Go
Webhooks.ListActivityWebhooks.ListAllActivityWebhooks.IterateActivity
Java
webhooks().listActivitywebhooks().listAllActivitywebhooks().iterateActivity
C#
Webhooks.ListActivityAsyncWebhooks.ListAllActivityAsyncWebhooks.IterateActivityAsync
CLI
nextmail webhooks list-activity
MCP
listWebhookActivity

GET/webhooks/events

List webhook events

Scopeswebhooks:readReads

Every event an endpoint can subscribe to, with a line saying when it fires, and the limits an endpoint is held to: how many endpoints this workspace may have, and how many addresses and domains one allowlist may name. An endpoint that names no events receives every email event except email.replied.

Requires the webhooks:read scope.

Returns

The events and the limits.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listEvents()
Python
webhooks.list_events()
Ruby
webhooks.list_events
PHP
webhooks->listEvents
Go
Webhooks.ListEvents
Java
webhooks().listEvents
C#
Webhooks.ListEventsAsync
CLI
nextmail webhooks list-events
MCP
listWebhookEvents

GET/webhooks/stats

Read webhook delivery stats

Scopeswebhooks:readReads

How the deliveries of every endpoint, or of the ones endpointIds names, went inside a window: attempts, delivered and failed, the median time a receiver took to answer, a series of buckets, the events sent and the response codes received. It is the Analytics tab of the Webhooks page. Each try of an event counts as one attempt.

Requires the webhooks:read scope.

Query parameters

endpointIdsstring

Comma-separated endpoint ids, at most 50. Left out, every endpoint you can see.

sincestring

The start of the window, an ISO 8601 instant. Left out, 30 days before until.

Formatdate-time
untilstring

The end of the window, an ISO 8601 instant, not included. Left out, now.

Formatdate-time
grainstring

How wide one bucket of the series is. The bucket keys change shape with it: YYYY-MM-DD for a day, YYYY-MM-DDTHH for an hour, YYYY-MM-DDTHH:MM for a minute.

One of"minute""hour""day"Default"day"
offsetMinutesinteger

Minutes to add to UTC before cutting the buckets, so a day starts at midnight where the reader is. 120 for UTC+2.

At least -840At most 840Default0

Returns

The totals, the series and the breakdowns.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.stats()
Python
webhooks.stats()
Ruby
webhooks.stats
PHP
webhooks->stats
Go
Webhooks.Stats
Java
webhooks().stats
C#
Webhooks.StatsAsync
CLI
nextmail webhooks stats
MCP
getWebhookStats

GET/webhooks/{id}/dead-letters

List dead letters

Scopeswebhooks:readReads

The events this endpoint gave up on, newest first and a page at a time. An event becomes a dead letter when its last automatic attempt fails: its retries ran out under the retry policy of the endpoint, the receiver gave an answer that is not tried again, or the endpoint was switched off before the next retry was due. Each one names the event, how many times it was tried, what the last attempt got back and that attempt in deliveryId, whose stored body GET /webhooks/{id}/deliveries/{deliveryId} reads. status keeps the open ones by default, those still waiting for somebody to replay or discard them; replayed and discarded read the closed ones and all reads every one. A dead letter is deleted 30 days after the event died, whatever its status, and the delivery log keeps every attempt. Keeping dead letters changes nothing about how events are delivered.

Requires the webhooks:read scope.

Path parameters

idstringRequired

The webhook endpoint, whe_ followed by 24 hex characters.

Query parameters

statusstring

open for the dead letters still waiting for a decision, replayed or discarded for the closed ones, or all.

One of"open""replayed""discarded""all"Default"open"
sincestring

Only rows at or after this instant, ISO 8601. One that does not parse is a 400 invalid_parameter.

Formatdate-time
untilstring

Only rows before this instant. It has to be later than since.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The nextCursor of the previous page, which is a dead letter id. Send the same filters with each page. A cursor that names no dead letter of this endpoint is a 400 invalid_cursor.

Returns

A page of dead letters, newest first.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.listDeadLetters()webhooks.listAllDeadLetters()webhooks.iterateDeadLetters()
Python
webhooks.list_dead_letters()webhooks.list_all_dead_letters()webhooks.iterate_dead_letters()
Ruby
webhooks.list_dead_letterswebhooks.list_all_dead_letterswebhooks.iterate_dead_letters
PHP
webhooks->listDeadLetterswebhooks->listAllDeadLetterswebhooks->iterateDeadLetters
Go
Webhooks.ListDeadLettersWebhooks.ListAllDeadLettersWebhooks.IterateDeadLetters
Java
webhooks().listDeadLetterswebhooks().listAllDeadLetterswebhooks().iterateDeadLetters
C#
Webhooks.ListDeadLettersAsyncWebhooks.ListAllDeadLettersAsyncWebhooks.IterateDeadLettersAsync
CLI
nextmail webhooks list-dead-letters
MCP
listWebhookDeadLetters

POST/webhooks/{id}/dead-letters/replay

Replay dead letters

Scopeswebhooks:writeSends mail

Sends open dead letters of this endpoint again, each through the same replay as POST /webhooks/{id}/deliveries/{deliveryId}/replay: the event goes out once, now, with its original id and a fresh signature, and is never retried automatically. Name up to 100 in ids, or leave the body out to replay the oldest 100 open ones. Each comes back with an outcome. delivered closes the dead letter as replayed and records the replay in its replayDeliveryId. failed leaves it open with the new attempt as its last one. refused sent nothing and leaves it open, with refusal holding the code and message a replay of one delivery is refused with, or resource_not_found for an id that is not a dead letter of this endpoint and dead_letter_resolved for one already closed. skipped was not reached this time. Replays go out five at a time, and when 5 in a row fail the call skips the rest, so a receiver that is still down is not sent the whole backlog; a call also stops starting new replays after about 20 seconds, or before it would use up the database work one request may do, so a long backlog can take a few calls. hasMore is true while open dead letters are left that this call did not send, so call it again. Refused with a 409 webhook_disabled while the endpoint is switched off, before anything is sent.

Requires the webhooks:write scope.

Path parameters

idstringRequired

The webhook endpoint, whe_ followed by 24 hex characters.

Request body

idsstring[]

The dead letters to replay, at most 100. Left out, the oldest open ones are replayed.

1 to 100 items

Returns

What happened to each dead letter.

Errors

409

webhook_disabled: the endpoint is switched off, so nothing was sent.

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.replayDeadLetters()
Python
webhooks.replay_dead_letters()
Ruby
webhooks.replay_dead_letters
PHP
webhooks->replayDeadLetters
Go
Webhooks.ReplayDeadLetters
Java
webhooks().replayDeadLetters
C#
Webhooks.ReplayDeadLettersAsync
CLI
nextmail webhooks replay-dead-letters
MCP
replayWebhookDeadLetters

DELETE/webhooks/{id}/dead-letters/{deadLetterId}

Discard a dead letter

Scopeswebhooks:writeDeletes

Closes an open dead letter as discarded without sending anything. The event stays in the delivery log, where it can still be replayed. Discarding one that is already discarded answers the same, and one that was replayed is a 409 dead_letter_resolved.

Requires the webhooks:write scope.

Path parameters

idstringRequired

The webhook endpoint, whe_ followed by 24 hex characters.

deadLetterIdstringRequired

A dead letter id, dlq_ followed by 24 hex characters.

Returns

The dead letter, now discarded.

Errors

409

dead_letter_resolved: the dead letter was already replayed.

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
webhooks.discardDeadLetter()
Python
webhooks.discard_dead_letter()
Ruby
webhooks.discard_dead_letter
PHP
webhooks->discardDeadLetter
Go
Webhooks.DiscardDeadLetter
Java
webhooks().discardDeadLetter
C#
Webhooks.DiscardDeadLetterAsync
CLI
nextmail webhooks discard-dead-letter
MCP
discardWebhookDeadLetter

Objects

AuditActorobject

Who made the change: a person, or a key acting over the API. Null when Nextmail made it on its own, such as switching a webhook off after 100 failed events in a row, and when the person or key has since been deleted.

Can be null
kindstring
One of"user""apiKey"
idstring

The account id of the person, or the id of the key.

namestring

The name of the person, or API key <name> for a key.

usernamestring
Can be null
labelstring

What the app shows: @username for a person who has a username, otherwise name.

DeletedWebhookobject

objectstringRequired
One of"webhook"
idstringRequired
deletedbooleanRequired
One oftrue

Webhookobject

objectstringRequired
One of"webhook"
idstringRequired
urlstringRequired
Formaturi
descriptionstringRequired
Can be null
eventTypesstring[]Required

What it listens for. An endpoint created with none reads as ["*"], which stands for the default set, the email.* events, not for every event.

One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked""*"
enabledbooleanRequired
disabledAtstringRequired

When it was switched off, by a person or after failing.

Can be nullFormatdate-time
disabledReasonstringRequired
Can be null
consecutiveFailuresintegerRequired
At least 0
addressAllowliststring[]Required

The single addresses it hears about. Empty on both lists means every address.

domainAllowliststring[]Required

The whole domains it hears about.

includeContentbooleanRequired

True to put the message itself into every email.received event this endpoint gets, as data.content: the text, the HTML up to 512 KiB, and each attachment with a link that downloads it for an hour without a credential. The receiver then needs no second call to read the mail. The content is read when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

includeRawbooleanRequired

True to give every email.received event this endpoint gets a link to the message source, as data.raw with url, size, source and expiresAt: the bytes exactly as they arrived when the address keeps originals, and otherwise the message rebuilt the way a mail app downloads it. The link needs no credential, works for an hour from each attempt and stops working once the endpoint is switched off or stops including the source. It is made when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

retryPolicystringRequired

How long a failed delivery is tried again. standard, the default, tries it up to 8 times over about 27 and a half hours: as it happens, then after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. extended tries it up to 16 times over about 3 days: as it happens, then after 1 minute, then after twice the last wait each time until the wait reaches 12 hours, then every 12 hours. The policy is read at every attempt, so a change also applies to events already waiting for a retry. Either way an event whose last attempt fails is kept as a dead letter for 30 days.

One of"standard""extended"
lastDeliveryAtstringRequired
Can be nullFormatdate-time
previousSecretExpiresAtstringRequired

When the secret it had before its latest rotation stops signing deliveries beside the current one, 24 hours after the rotation, or null when only the current secret signs.

Can be nullFormatdate-time
createdAtstringRequired
Formatdate-time

WebhookActivityEntryobject

objectstring
One of"webhook_event"
idstring
endpointIdstring

The endpoint the change was made to. A removed endpoint keeps its history.

endpointLabelstring

The host the endpoint posts to, or the host it posted to before it was removed.

typestring
One of"created""updated""enabled""disabled""auto_disabled""secret_rotated""tested""replayed""removed"
createdAtstring
Formatdate-time
detailobject

What changed: the URL, and for an update the fields that moved, previousUrl when the URL did. A test or a replay also carries the status and response code it got.

WebhookActivityListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

WebhookCatalogueobject

objectstringRequired
One of"webhook_catalogue"
eventsobject[]Required
idstringRequired
One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
labelstringRequired

When the event fires, in a sentence.

maxEndpointsintegerRequired

How many endpoints this workspace may have, which its plan decides. Null when there is no limit.

Can be nullAt least 0
maxAddressesintegerRequired

How many addresses one allowlist may name, 50.

maxDomainsintegerRequired

How many domains one allowlist may name, 25.

WebhookDeadLetterobject

objectstringRequired
One of"webhook_dead_letter"
idstringRequired

dlq_ followed by 24 hex characters.

endpointIdstringRequired
eventIdstringRequired

The event, the same id every attempt and replay of it carries.

eventTypestringRequired
One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
statusstringRequired

open until somebody decides, then replayed once a replay of the event was delivered, or discarded.

One of"open""replayed""discarded"
attemptsintegerRequired

How many times the event was tried, the replays that failed included.

At least 1
responseCodeintegerRequired

What the last attempt got back. Null when no response arrived at all.

Can be null
errorstringRequired

Why the last attempt failed, or why it was not tried again.

Can be null
deliveryIdstringRequired

The last attempt that failed, whose stored body a replay sends again.

replayDeliveryIdstringRequired

The replay that was delivered, while status is replayed.

Can be null
diedAtstringRequired

When the event was given up on.

Formatdate-time
resolvedAtstringRequired
Can be nullFormatdate-time
expiresAtstringRequired

When it is deleted, 30 days after diedAt.

Formatdate-time

WebhookDeadLetterListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

The id of the last row on this page, or null on the last page.

Can be null

WebhookDeadLetterReplayobject

objectstringRequired
One of"webhook_dead_letter_replay"
idstringRequired

The dead letter.

outcomestringRequired

delivered and failed were sent, refused was not sent for the reason in refusal, and skipped was not reached by this call.

One of"delivered""failed""refused""skipped"
deliveryIdstringRequired

The replay, recorded as a new delivery. Null when nothing was sent.

Can be null
deliveryobjectRequired
Can be null
statusstringRequired
One of"delivered""failed"
responseCodeintegerRequired
Can be null
durationMsintegerRequired
Can be null
errorstringRequired
Can be null
refusalobjectRequired

Why nothing was sent. Null unless outcome is refused.

Can be null
codestringRequired
One of"resource_not_found""webhook_disabled""event_not_subscribed""event_out_of_scope""delivery_not_replayable""retry_in_progress""replay_in_progress""dead_letter_resolved"
messagestringRequired

WebhookDeadLetterReplayListobject

objectstringRequired
One of"list"
dataWebhookDeadLetterReplay[]Required

One entry per dead letter, in the order they were named or picked.

hasMorebooleanRequired

True while open dead letters are left that this call did not send.

WebhookDeliveryobject

objectstring
One of"webhook_delivery"
idstring

whd_ followed by 24 hex characters.

endpointIdstring

The endpoint this attempt was sent to.

eventTypestring
One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
eventIdstring

The payload id, the same on every retry and replay of one event.

Can be null
statusstring
One of"delivered""failed"
responseCodeinteger

Null when no response arrived at all, such as a timeout or a DNS failure.

Can be null
durationMsinteger
Can be null
attemptinteger
Can be null
maxAttemptsinteger
Can be null
errorstring
Can be null
createdAtstring
Formatdate-time
nextAttemptAtstring

When the automatic retry that follows this attempt is due. Null when none is waiting.

Can be nullFormatdate-time

WebhookDeliveryAttemptobject

idstringRequired
attemptintegerRequired
Can be null
maxAttemptsintegerRequired
Can be null
statusstringRequired
One of"delivered""failed"
responseCodeintegerRequired
Can be null
durationMsintegerRequired
Can be null
errorstringRequired
Can be null
createdAtstringRequired
Formatdate-time

WebhookDeliveryDetailobject

objectstring
One of"webhook_delivery"
idstring

whd_ followed by 24 hex characters.

endpointIdstring

The endpoint this attempt was sent to.

eventTypestring
One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
eventIdstring

The payload id, the same on every retry and replay of one event.

Can be null
statusstring
One of"delivered""failed"
responseCodeinteger

Null when no response arrived at all, such as a timeout or a DNS failure.

Can be null
durationMsinteger
Can be null
attemptinteger
Can be null
maxAttemptsinteger
Can be null
errorstring
Can be null
createdAtstring
Formatdate-time
nextAttemptAtstring

When the automatic retry that follows this attempt is due. Null when none is waiting.

Can be nullFormatdate-time
payloadobjectRequired

The JSON body that was posted. For an endpoint with includeContent on, the message content it carried is left out of this copy.

Can be null
responseBodystringRequired

The first 2,000 characters your server answered.

Can be null
attemptsWebhookDeliveryAttempt[]Required

Every try of the same event on this endpoint, oldest first.

replayRefusalobjectRequired

Why a replay would be refused. Null when it would be accepted.

Can be null
codestringRequired
One of"resource_not_found""webhook_disabled""event_not_subscribed""event_out_of_scope""delivery_not_replayable""retry_in_progress""replay_in_progress"
messagestringRequired

WebhookDeliveryListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

The id of the last delivery on this page, or null on the last page.

Can be null

WebhookListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

WebhookReplayobject

objectstringRequired
One of"webhook_replay"
idstringRequired

The new delivery the replay was recorded as.

endpointIdstringRequired
replayOfstringRequired

The delivery that was sent again.

eventIdstringRequired

The event, the same id as on the original.

eventTypestringRequired
One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked"
deliveryobjectRequired
statusstringRequired
One of"delivered""failed"
responseCodeintegerRequired

What your server answered. Null when no response arrived at all.

Can be null
durationMsintegerRequired
Can be null
errorstringRequired
Can be null

WebhookStatsobject

objectstringRequired
One of"webhook_stats"
sincestringRequired
Formatdate-time
untilstringRequired
Formatdate-time
grainstringRequired
One of"minute""hour""day"
endpointIdsstring[]Required

The endpoints asked for. Empty means every endpoint.

totalsobjectRequired
attemptsinteger
deliveredinteger
failedinteger
medianDurationMsnumber

Null when nothing was sent in the window.

Can be null
bucketsobject[]Required
bucketstring
deliveredinteger
failedinteger
eventsobject[]Required
idstring
countinteger
codesobject[]Required
idstring

The HTTP status the receiver answered with.

countinteger

WebhookTestobject

objectstringRequired
One of"webhook_test"
idstringRequired

The endpoint.

deliveryobjectRequired
statusstringRequired
One of"delivered""failed"
responseCodeintegerRequired

What your server answered. Null when no response arrived at all.

Can be null
durationMsintegerRequired
Can be null
errorstringRequired
Can be null

WebhookWithSecretobject

objectstringRequired
One of"webhook"
idstringRequired
urlstringRequired
Formaturi
descriptionstringRequired
Can be null
eventTypesstring[]Required

What it listens for. An endpoint created with none reads as ["*"], which stands for the default set, the email.* events, not for every event.

One of"email.received""email.replied""email.sent""email.failed""email.cancelled""email.scheduled""email.queued""email.delivered""email.delivery_delayed""email.bounced""email.complained""email.suppressed""email.opened""email.clicked""email.downloaded""email.routed""domain.verified""domain.sending_changed""domain.deleted""domain.access_granted""domain.access_revoked""suppression.added""suppression.removed""file.uploaded""file.deleted""form.submitted""form.confirmed""automation.entered""automation.exited""automation.paused""automation.resumed""automation.webhook""contact.created""contact.updated""contact.deleted""contact.unsubscribed""contact.resubscribed""sending.paused""sending.resumed""connector.connected""connector.disconnected""connector.needs_attention""task.run.completed""task.run.failed""task.run.cancelled""approval.requested""booking.created""booking.confirmed""booking.rescheduled""booking.cancelled""broadcast.sending""broadcast.sent""broadcast.failed""broadcast.cancelled""address.expired""address.access_granted""address.access_revoked""*"
enabledbooleanRequired
disabledAtstringRequired

When it was switched off, by a person or after failing.

Can be nullFormatdate-time
disabledReasonstringRequired
Can be null
consecutiveFailuresintegerRequired
At least 0
addressAllowliststring[]Required

The single addresses it hears about. Empty on both lists means every address.

domainAllowliststring[]Required

The whole domains it hears about.

includeContentbooleanRequired

True to put the message itself into every email.received event this endpoint gets, as data.content: the text, the HTML up to 512 KiB, and each attachment with a link that downloads it for an hour without a credential. The receiver then needs no second call to read the mail. The content is read when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

includeRawbooleanRequired

True to give every email.received event this endpoint gets a link to the message source, as data.raw with url, size, source and expiresAt: the bytes exactly as they arrived when the address keeps originals, and otherwise the message rebuilt the way a mail app downloads it. The link needs no credential, works for an hour from each attempt and stops working once the endpoint is switched off or stops including the source. It is made when each attempt is sent and is left out of the delivery log. Turning it on needs threads:read as well as webhooks:write, because it hands over mail. Defaults to false.

retryPolicystringRequired

How long a failed delivery is tried again. standard, the default, tries it up to 8 times over about 27 and a half hours: as it happens, then after 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. extended tries it up to 16 times over about 3 days: as it happens, then after 1 minute, then after twice the last wait each time until the wait reaches 12 hours, then every 12 hours. The policy is read at every attempt, so a change also applies to events already waiting for a retry. Either way an event whose last attempt fails is kept as a dead letter for 30 days.

One of"standard""extended"
lastDeliveryAtstringRequired
Can be nullFormatdate-time
previousSecretExpiresAtstringRequired

When the secret it had before its latest rotation stops signing deliveries beside the current one, 24 hours after the rotation, or null when only the current secret signs.

Can be nullFormatdate-time
createdAtstringRequired
Formatdate-time
secretstringRequired

The signing secret, shown this once. Verify every delivery with it.