Webhooks let RelayOS push delivery status updates to your server the moment they happen, instead of requiring you to pollDocumentation Index
Fetch the complete documentation index at: https://docs.relayos.com.br/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/messages/{id}. Each time a message changes status — sent, delivered, read, or failed — RelayOS sends an HTTP POST request to the callbackUrl you configure on your project. Your endpoint receives a JSON payload describing the event and can use it to update your database, trigger follow-up logic, or surface delivery confirmation to your users.
Configure your callback URL
Set yourcallbackUrl by calling PUT /v1/projects/me/meta-credentials. You can include it alongside your Meta credentials or update it on its own at any time.
Webhook event payload
Every event RelayOS sends has the same JSON structure. Theevent field tells you which status transition occurred, and message_id lets you correlate the event to the original message.
Payload fields
The type of event that occurred. See the event types table below.
The RelayOS message ID returned when you called
POST /v1/messages. Use this to match events to messages in your system.The recipient phone number in E.164 format.
The name of the template used for this message.
The new status of the message after this event. Mirrors the
event field in upper-case noun form: SENT, DELIVERED, READ, or FAILED.The opaque message ID assigned by Meta’s WhatsApp Cloud API (
wamid.*). Useful for support escalations.ISO 8601 UTC timestamp of when the status change occurred.
Event types
| Event | Triggered when |
|---|---|
message.sent | Meta confirmed the message left their servers toward the recipient’s device. |
message.delivered | The message arrived on the recipient’s device. |
message.read | The recipient opened the message (requires read receipts to be enabled). |
message.failed | All delivery attempts failed after exponential backoff retries. |
Request headers RelayOS sends
RelayOS includes the following headers on every webhookPOST so your server can identify and deduplicate events:
| Header | Value | Description |
|---|---|---|
X-RelayOS-Event | e.g. message.delivered | The event type, matching the event field in the payload. |
X-RelayOS-Delivery | UUID string | A unique identifier for this specific delivery attempt. Use it to deduplicate retries. |
User-Agent | RelayOS/1.0 | Identifies the sender as the RelayOS platform. |
Handle and acknowledge events
Your endpoint must respond with any2xx HTTP status code within a reasonable time. RelayOS considers any other response — including 3xx redirects, 4xx errors, 5xx errors, or a timeout — a failed delivery and will retry.