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.
List webhooks
Section titled “List webhooks”GET /inbox/:address/webhooks[ { "id": "abc123", "inbox": "hello@maile.uk", "url": "https://example.com/hook", "label": "My server", "enabled": true, "createdAt": 1713600000000 }]Add webhook
Section titled “Add webhook”POST /inbox/:address/webhooksBody
{ "url": "https://example.com/hook", "label": "My server" }Toggle webhook
Section titled “Toggle webhook”PATCH /inbox/:address/webhooks/:idBody
{ "enabled": false }Delete webhook
Section titled “Delete webhook”DELETE /inbox/:address/webhooks/:idWebhook payload
Section titled “Webhook payload”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"}| Field | Type | Description |
|---|---|---|
id | string | Unique email ID |
from | string | Sender email address |
to | string | Recipient (inbox) address |
subject | string | Email subject line |
receivedAt | number | Unix timestamp in milliseconds |
inbox | string | Inbox address (same as to) |
Your endpoint should respond with any 2xx status. Failed requests are not retried.