Skip to main content
Register an HTTPS URL and the Omni API posts a signed JSON event to it whenever a subscribed resource changes state.

Register an endpoint

Use an administrator session, the account token, or an API key holding webhooks:manage:
The first successful response (201) includes the endpoint’s signing secret. Store it immediately. It is never returned again — an identical retry returns 200 without it.
Managing endpoints:
  • Each account can hold up to 16 endpoints (active and disabled combined). Endpoints are enabled by default unless created with "enabled": false.
  • Use GET, PATCH, and DELETE /admin/webhooks/{webhook_id} to inspect, update, or remove an endpoint.
  • Use POST /admin/webhooks/{webhook_id}/rotate_secret (with a fresh Idempotency-Key) to generate a replacement signing secret once.
  • Changing the URL, disabling, rotating the secret, or deleting an endpoint cancels pending retry attempts for its previous configuration. A request already in flight may still arrive.

Event types

Every event uses the same envelope:
data is a snapshot captured at the transition. Because pricing can settle later, fetch the resource when you need its latest state. For a number’s live capabilities, prices, and campaign status, call GET /numbers/{phone_number}.

Verify the signature

Every delivery includes two headers: The signature is HMAC-SHA256(secret_utf8, "<timestamp>." + raw_body_bytes). Verify before parsing JSON:
  1. Require exactly one X-Sendblue-Signature header.
  2. Read the exact raw request bytes before any JSON parser touches them.
  3. Reject timestamps more than 5 minutes (300 seconds) from your clock.
  4. Compute the HMAC and compare digests in constant time.

Handle deliveries reliably

Respond with any 2xx status as soon as you durably store the event. Design your receiver for:
  • Duplicates: retries carry a fresh timestamp, the same event id, and the same delivery ID. Store the event id in the same transaction as your state change and ignore IDs you have already processed.
  • Reordering: events can arrive out of transition order.
  • Timeouts: a delivery can time out after your handler has already applied the change and will then be retried.

Retries, delivery log, and replay

  • Retry schedule: network failures and HTTP 408, 425, 429, or 5xx responses are retried up to 6 attempts with waits of 1 min, 5 min, 30 min, 2 hr, and 8 hr. Any other non-2xx response stops retries.
  • 30-day delivery log: GET /admin/webhooks/{webhook_id}/deliveries lists delivery metadata (IDs, event type, status, attempt count, HTTP status, timestamps) for 30 days. No message or response bodies are stored there.
  • 7-day replay: event bodies are retained for 7 days. Within that window, POST /admin/webhooks/{webhook_id}/deliveries/{delivery_id}/replay (with a new Idempotency-Key) re-sends the original event id and snapshot to the endpoint’s current configuration under a new delivery ID.
  • Erasure: redacting or deleting a message — or deleting one of its media attachments — removes its stored event snapshots from future delivery and replay.
Per-message status_callback URLs and call/TwiML callback URLs are a separate mechanism. They send Twilio-compatible form parameters signed with X-Twilio-Signature, not the signed JSON described here. Webhook endpoints receive their events independently.