SMS events and live stream
Receive signed lifecycle webhooks and resume live dashboard updates safely.
Workspace webhook endpoints can subscribe to sms.received, sms.accepted, sms.sent, sms.delivered, sms.delivery_failed, sms.delivery_unconfirmed, sms.submission_unknown, sms.opted_out, and sms.opted_in.
Organization-wide endpoints receive every SMS event. Agent-filtered endpoints receive an event when its message's agent_id is one of their configured agents. SMS events do not require a voice agent or session ID.
Each event carries the message as it stands after the change:
{
"message": {
"id": "5f1c...",
"conversation_id": "a8d2...",
"phone_number_id": "8f0e9a96-...",
"agent_id": "agent_7c1d...",
"direction": "outbound",
"origin": "api",
"from": "+12125550101",
"to": "+12125550100",
"text": "Your appointment is tomorrow at 10am.",
"status": "delivery_failed",
"campaign_id": "C1A2B3C",
"segments": 1,
"error": { "code": "40008", "detail": "Undeliverable: The destination handset is unreachable." },
"metadata": {},
"occurred_at": "2026-10-20T12:00:30.000Z"
}
}phone_number_id is the workspace number the message went through, in either direction. agent_id is the agent handling the conversation when the message was written, or null when no agent handled it. It never changes, so after a number moves to another agent, delivery events for the old agent's messages still go to the old agent's endpoints. error is null while nothing has gone wrong. A local rejection carries a Speko code (see SMS billing and errors). A carrier failure carries the Telnyx error code in code and its title and description in detail.
sms.delivery_unconfirmed means the carrier accepted the message but never sent a delivery receipt. It is not a failure, and the message may well have arrived. If a definitive receipt arrives later, Speko sends sms.delivered or sms.delivery_failed for the same message.
A later status that supersedes a failure, such as a delivery receipt after sms.delivery_failed, sets error back to null.
Payloads include message text by default. Set contentMode: "metadata_only" on the webhook endpoint to omit it. Webhook requests are signed with the endpoint/workspace Standard Webhooks secret; deduplicate on webhook-id and return 2xx quickly.
Message bodies, consent proof, and raw webhook bodies are excluded from logs, traces, analytics, and error reporting.
Live event stream
GET /v1/sms/stream is a server-sent event stream for dashboard clients. Event data includes message_id, conversation_id, status, and occurred_at. On reconnect, send the last SSE ID in Last-Event-ID; Speko catches up from PostgreSQL before subscribing to live Redis events.
The stream is a UI synchronization channel, not a replacement for signed customer webhooks or message reads. Re-read the message or conversation after each event.