v77

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012528701.8 MB
Messages

Message status callback

Payload sent by SignalWire to the status_callback URL each time a message transitions to a new state. The same payload shape is used for RELAY SDK message callbacks, SWML send_sms status callbacks, and SWML messaging reply.status_url callbacks.

Configure status_callback when sending a message.

postWebhookmessageStatusCallback

Payload

idstring uuid required

The unique ID of the message segment.

project_idstring uuid required

The ID of the project the message belongs to.

status'queued' | 'initiated' | 'sent' | 'delivered' | 'undelivered' | 'failed' | 'read' required

The current delivery state of the message.

tostring required

The destination phone number.

fromstring required

The source phone number.

bodystring required

The message body text.

number_of_segmentsinteger required

Number of segments the message body was split into for delivery.

timestampstring date-time required

Timestamp of the status transition.

error_codestring nullable required

Provider-specific error code if delivery failed. Null when no error occurred.

error_messagestring nullable required

Human-readable error message if delivery failed. Null when no error occurred.

custom_variablesobject

The same custom_variables key/value pairs you supplied when sending the message, echoed back so you can match this callback to a record in your own system. Included only when the message was sent with custom variables.

Example payload

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "project_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "delivered",
  "to": "+15551234567",
  "from": "+15559876543",
  "body": "Hello World!",
  "number_of_segments": 1,
  "timestamp": "2026-03-17T22:26:57Z",
  "custom_variables": {
    "id": "12345",
    "case_number": "54321"
  }
}

Response

Webhook received