Skip to content

Webhooks

Go to the Webhooks tab in the sidebar of any inbox to configure 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:

  1. Open the Webhooks tab in any inbox
  2. Click Add local webhook
  3. Enter the URL and an optional label
  4. Use the Test button to send a sample payload and verify your endpoint

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:

  1. Open the Webhooks tab in any inbox
  2. Click Add remote webhook
  3. Enter the URL and an optional label
  4. Toggle the switch to enable or disable it at any time

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"
}
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 remote webhook requests are not retried.