Skip to main content
Paubox webhooks push event notifications to an HTTPS URL you own. Configure them in the Paubox Dashboard or programmatically via the Webhook Endpoints API.
Organization-wide scope: Webhooks are triggered at the organization level. Events from all domains in your organization will be sent to the configured webhook URL; there is no per-domain filtering. Design your handler to inspect the from field in the payload (or payload.data.domain for inbound mail) if you need to route events by domain.

Webhook endpoint fields

  • URL: An HTTPS URL you own, to which webhook payloads are delivered.
  • Events: One or more event types to subscribe to.
  • Signing key (optional): Included as the x-webhook-signing-key header on each delivery so your handler can verify the request came from Paubox. Endpoints subscribed to inbound mail instead get a generated signing secret (whsec_...), shown once when you create the endpoint. See Verifying webhook signatures.
  • Active: Whether the endpoint receives deliveries. Defaults to true.

Available events

Payloads

Every webhook notification includes an event_name or event key and a payload or data key. The payload structure depends on the event type.

Outbound delivery events

Inbound mail received

Each email that arrives on one of your receiving domains produces one email.inbound.received event, usually within seconds. Mail classified as spam is included, with spam: true.
Envelope Email (payload.data) Attachments

Managing webhook endpoints via the API

Webhook endpoints for outbound delivery events can be managed programmatically. See the API reference for full details. To subscribe to email.inbound.received, use the Paubox Dashboard.

Retry behavior

Inbound mail events are retried when your endpoint responds with 429, a 5xx status, takes longer than 30 seconds, or can’t be reached. Paubox retries after 30 seconds, 2 minutes and 5 minutes, for up to 4 attempts in total. Any other non-2xx response is treated as final and isn’t retried. A 410 Gone response also disables the endpoint. Respond with a 2xx status once you’ve accepted the event. Because a retry can follow a request your endpoint did receive, deduplicate on payload.data.email_id. Outbound delivery events: Paubox does not currently retry failed webhook deliveries. If your endpoint is unavailable when an event fires, that notification will not be re-sent. Design your endpoint to be highly available, and use the Get message receipt endpoint to poll for status if you need guaranteed delivery tracking.

Verifying webhook signatures

Inbound mail events

Every inbound mail delivery is signed with your endpoint’s signing secret (whsec_...), shown once when you create the endpoint. Each request carries two headers:
  • X-Paubox-Timestamp: when the request was signed, in Unix seconds.
  • X-Paubox-Signature: a hex-encoded HMAC-SHA256 of <timestamp>.<raw request body>, keyed with the whole signing secret, including the whsec_ prefix.
To verify a request:
  1. Read the raw request body before parsing it as JSON.
  2. Compute the HMAC-SHA256 of the timestamp, a ., and the raw body, using your signing secret as the key.
  3. Compare it with X-Paubox-Signature using a constant-time comparison.
  4. Reject requests whose timestamp is more than a few minutes old. The timestamp is part of the signed content, so a captured request can’t be replayed with a fresh one.

Outbound delivery events

If you configured a signing_key on your webhook endpoint, Paubox includes it as the x-webhook-signing-key header on every delivery. Compare this value in your handler to verify the request came from Paubox. For additional protection, use network-level controls such as IP allowlisting.