Webhooks
Go to the Webhooks tab in the sidebar of any inbox to configure webhooks.
Local webhooks
Section titled “Local webhooks”Local webhooks are stored in your browser’s localStorage and fired client-side via fetch when a new email arrives through the SSE connection.
When to use local webhooks:
- You want to trigger automation in your browser or a local dev environment
- You’re testing with a tunnelling tool like ngrok or localhost.run
- You don’t need guaranteed delivery when the browser tab is closed
Adding a local webhook:
- Open the Webhooks tab in any inbox
- Click Add local webhook
- Enter the URL and an optional label
- Use the Test button to send a sample payload and verify your endpoint
Remote webhooks
Section titled “Remote webhooks”Remote webhooks are stored in the database and fired server-side by the Cloudflare Worker immediately when an email is received — before any browser is involved.
When to use remote webhooks:
- You need delivery even when the browser is closed
- You’re integrating with CI/CD pipelines, Slack, Discord, or custom servers
- You need reliability and don’t want to depend on an open browser tab
Remote webhooks can be enabled or disabled individually without deleting them — useful for temporarily pausing a hook while keeping the URL saved.
Adding a remote webhook:
- Open the Webhooks tab in any inbox
- Click Add remote webhook
- Enter the URL and an optional label
- Toggle the switch to enable or disable it at any time
Webhook payload
Section titled “Webhook payload”Both local and remote webhook types deliver the same JSON payload via POST:
{ "id": "V1StGXR8_Z5jdHi6B-myT", "from": "sender@example.com", "to": "hello@maile.uk", "subject": "Your OTP: 123456", "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 remote webhook requests are not retried.