Skip to main content
When an email arrives at one of your inboxes, or the reputation engine suspends or reactivates an inbox or pod, OpenMail sends the event to your endpoints as an HTTP POST. See Events for the full list.

Why use webhooks?

Instead of constantly polling the API to check for new emails, register a URL and OpenMail sends a POST as soon as an event happens.
  • Real-time - Build agents that reply to emails in seconds.
  • Efficient - No polling; saves compute and simplifies your logic.

Endpoints

You manage webhooks on the Webhooks page. You can add as many endpoints as you need. Each endpoint has its own:
  • URL - Where OpenMail sends the POST.
  • Events - The event types it receives.
  • Scope - The whole organisation, or a set of pods and inboxes.
  • Authentication - How OpenMail proves the request is genuine. See Authentication.
  • Status - Enabled or disabled.
An event goes to every enabled endpoint that subscribes to its type and matches its scope. Each endpoint gets its own delivery and its own retries. Only the organisation owner can add, edit, or delete endpoints, reveal or rotate secrets, send test events, or redeliver.

Scope

Leave Scope empty and the endpoint receives events from every inbox and pod. Pick pods or inboxes to narrow it:
  • An inbox event matches when its inbox is listed, or the inbox’s pod is listed.
  • A pod.* event matches when its pod is listed. An endpoint scoped only to inboxes does not receive pod.* events.
Inbox webhooks set through the API (webhookUrl on an inbox) show up here as an endpoint scoped to that inbox. They fire in addition to your organisation-wide endpoints.

Disabling an endpoint

Disable an endpoint from its page to pause it. OpenMail stops sending to it, and pending retries are marked as failed. Events that happen while it is disabled are not kept for later. Enable it again to resume.

Authentication

Each endpoint has one optional Auth header or secret field. OpenMail picks the scheme from what you paste: You can paste a whole Authorization: Bearer … header or just the token. See Verification for the headers and code for each scheme.

Delivery semantics

  • At-least-once delivery - We may deliver the same event more than once. Use event_id to deduplicate.
  • No ordering guarantee - Events may arrive out of order. Use occurred_at to sort if needed.
  • Same ID on every endpoint - When an event goes to several endpoints, each gets the same event_id.

Retry policy

A delivery fails when your endpoint doesn’t return 2xx within 15 seconds. OpenMail doesn’t follow redirects, so a 3xx also counts as a failure. Failed deliveries are retried: After 5 failed attempts, the delivery is marked as failed. You can redeliver it from the console.

Delivery logs

The Logs tab on the Webhooks page lists every delivery. Filter by status (delivered, failed, pending) or event type. Open a delivery to see:
  • The payload OpenMail sent.
  • The HTTP response code or error.
  • How many attempts it took.
Click Replay to redeliver it. A redelivery sends the same payload with the same event_id, with a fresh set of retries. The Endpoints tab shows each endpoint’s error rate over the last 24 hours. An endpoint’s own page shows its delivered and failed counts for the same window, and its message attempts.

Full payload and verification

Events

Payload structure and field descriptions.

Verification

Verify each authentication scheme, with code.

Setup

Add an endpoint and implement the handler.

Connect a platform

Send events to Grok, Hermes Agent, or OpenClaw.