Skip to main content
Webhooks send events for emails you sent with the API to a URL you choose. You don’t need to poll. Each workspace has its own webhook URL, which receives every event type for emails sent from that workspace’s domains. One API key can send from any of your workspaces, and each event goes to the webhook of the workspace the email was sent from.

Events

Automated opens and clicks by mail security scanners are filtered out. Sample payloads for each event are listed under Webhook Events in the sidebar.

Set up your webhook

  1. In the dashboard, switch to the workspace that owns your sending domain, go to Integrations, open Deliveryman API Keys and click Manage.
  2. Under Webhook Events, enter your endpoint URL and click Save webhook. The URL must use https:// and be publicly reachable.
From the same page you can pause events or remove the webhook. Events that happen while the webhook is paused are not delivered later.

Event format

Every event is a POST request with a JSON body. All events share the same envelope:
  • id is unique per event. Use it to ignore duplicate deliveries.
  • type is the event type.
  • data.message_id matches the message_id returned by Send Email.
  • The other data fields depend on the event type.

Respond and retries

Respond with any 2xx status within 10 seconds. Do slow work, like calling other APIs, after you respond. If your endpoint returns another status, times out or can’t be reached, the event is retried 3 more times: after 1, 5 and 15 minutes. Redirects are not followed, so use the final URL. Events can occasionally arrive more than once or out of order. Use id to ignore duplicates, and the timestamps in data to order them. If you miss an event, Retrieve Sent Email returns the email’s current status, opens, clicks, bounce and replies.