GET /v1/sms/stream
SMS
GET /v1/sms/stream
Subscribe to real-time inbound SMS events via Server-Sent Events (SSE).
GET
GET /v1/sms/stream
Opens a long-lived Server-Sent Events (SSE) connection that pushes inbound SMS messages to your client in real time. Messages are scoped to the phone numbers owned by the authenticated API key.
Sent immediately after the connection is established.
Sent when an inbound SMS arrives on one of your active Telnyx phone numbers.
Authentication
Requires a Bearer API key with thesms:read scope.
Events
connected
Sent immediately after the connection is established.
sms_received
Sent when an inbound SMS arrives on one of your active Telnyx phone numbers.
| Field | Type | Description |
|---|---|---|
message_id | string | Unique identifier for the message |
from | string | Sender phone number (E.164) |
to | string | Your Telnyx phone number that received the message (E.164) |
body | string | Message text content |
received_at | string | ISO 8601 timestamp of when the message was received |
Heartbeat
A comment-only heartbeat is sent every 30 seconds to keep the connection alive:Connection behavior
- Max duration: 300 seconds (5 minutes). Reconnect after the connection closes.
- Auto-reconnect: Use
EventSourcein the browser for automatic reconnection with exponential backoff. - Scope filtering: Events are filtered to the user or team associated with the API key.