Skip to content

Webhooks API

Remote webhooks are fired server-side when an email arrives — they work even when the browser is closed. They are scoped per inbox and stored in D1.

GET /inbox/:address/webhooks
[
{
"id": "abc123",
"inbox": "hello@maile.uk",
"url": "https://example.com/hook",
"label": "My server",
"enabled": true,
"createdAt": 1713600000000
}
]
POST /inbox/:address/webhooks

Body

{ "url": "https://example.com/hook", "label": "My server" }
PATCH /inbox/:address/webhooks/:id

Body

{ "enabled": false }
DELETE /inbox/:address/webhooks/:id

Your server will receive a POST with Content-Type: application/json:

{
"id": "V1StGXR8_Z5jdHi6B-myT",
"from": "sender@example.com",
"to": "hello@maile.uk",
"subject": "Hello!",
"receivedAt": 1713600000000,
"inbox": "hello@maile.uk"
}
FieldTypeDescription
idstringUnique email ID
fromstringSender email address
tostringRecipient (inbox) address
subjectstringEmail subject line
receivedAtnumberUnix timestamp in milliseconds
inboxstringInbox address (same as to)

Your endpoint should respond with any 2xx status. Failed requests are not retried.