Skip to main content
Retrieve details of a specific SMS message by ID.

Path Parameters

id
string
required
The unique SMS message ID

Response

id
string
Unique message ID
from
string
Sender phone number
to
string
Recipient phone number
body
string
Message content
status
string
Current status: queued, sending, sent, delivered, failed, or undelivered
segments
number
Number of SMS segments used
azure_message_id
string
Azure Communication Services message ID
sent_at
string
ISO 8601 timestamp when the message was sent
delivered_at
string
ISO 8601 timestamp when the message was delivered
error
string
Error message if status is failed
error_code
string
Error code if status is failed
metadata
object
Custom metadata attached to the message
tags
string[]
Tags attached to the message
created_at
string
ISO 8601 timestamp when the message was created

Example

curl https://www.unosend.co/api/v1/sms/sms_abc123 \
  -H "Authorization: Bearer un_your_api_key"

Response Example

{
  "id": "sms_abc123",
  "from": "+18005551234",
  "to": "+14155551234",
  "body": "Your verification code is 123456",
  "status": "delivered",
  "segments": 1,
  "azure_message_id": "acs_xyz789",
  "sent_at": "2024-01-15T10:30:00Z",
  "delivered_at": "2024-01-15T10:30:02Z",
  "error": null,
  "error_code": null,
  "metadata": {},
  "tags": [],
  "created_at": "2024-01-15T10:30:00Z"
}