Receive transactional email delivery callbacks

Webhook setup

Receive transactional email delivery callbacks

Configure webhooks on HTTP send so Routee POSTs delivery and engagement updates to your server instead of polling the tracking API.

Prerequisite: Send your first transactional email. Callbacks are configured on POST /transactional-email only (not SMTP).


1. Status callback (delivery updates)

Add callback.statusCallback to your send body:

{
  "from": { "address": "[email protected]" },
  "to": [{ "address": "[email protected]" }],
  "subject": "Order shipped",
  "content": { "html": "<p>Your order is on the way.</p>" },
  "isSingleChannel": true,
  "callback": {
    "statusCallback": {
      "strategy": "OnChange",
      "url": "https://partner.example/webhooks/email-status"
    }
  }
}
strategyBehaviour
OnChangePOST on every status transition
OnCompletionPOST when delivery reaches a final state

2. Event callback (opens & clicks)

{
  "callback": {
    "eventCallback": {
      "onOpen": "https://partner.example/webhooks/email-open",
      "onClick": "https://partner.example/webhooks/email-click"
    }
  }
}

Use together with statusCallback when you need both delivery and engagement notifications.


3. Handle incoming POSTs

Your endpoint must:

  1. Accept POST with Content-Type: application/json
  2. Return HTTP 200 within 2 seconds
  3. Ignore unknown JSON fields (forward compatibility)

Routee retries failed deliveries per platform policy (same as Viber callbacks — up to 12 retries over 24 hours).

Firewall

Whitelist inbound traffic from callbacksallow.routee.net.


4. Correlate with trackingId

The send response includes trackingId. Store it when you send — use it to match callback payloads and to call Get email tracking (single message timeline) if you need full SMTP diagnostics.


5. When to poll instead

Use callbacksUse polling
Production backends with a public HTTPS URLLocal development without a tunnel
Real-time dashboardsLow-volume or batch reconciliation
Engagement (open/click) eventsSMTP-only sends

Full reference

Email tracking, statuses & callbacks — lifecycle statuses, timeline fields, search filters.


Related