Retrieve an SMS message
GET/api/v1/sms/{id}
GET /sms/{id}
curl -X GET 'https://www.unitpost.com/api/v1/sms/sms_123' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "sms",
"id": "id_123",
"to": "customer@example.com",
"from": "you@yourdomain.com",
"direction": "outbound",
"status": "queued",
"type": "transactional",
"body": "string",
"segments": 0,
"country": "string",
"scheduled_at": "2026-01-01T00:00:00.000Z",
"last_error": "string",
"error": {
"code": "out_of_reach",
"message": "string"
},
"created_at": "2026-01-01T00:00:00.000Z"
}Retrieve one SMS message's current status, delivery state, and segment count by id. Requires the sms:read capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | The SMS message id (`sms_…`). |
Response · 200 fields14 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
torequired | string | — |
fromrequired | object | — |
directionrequired | enumoutbound | inbound | — |
statusrequired | enumqueued | scheduled | sending | sent | delivered | failed | suppressed | canceled | received | — |
typerequired | enumtransactional | marketing | — |
bodyrequired | object | — |
segmentsrequired | integer | — |
countryrequired | object | — |
scheduled_atrequired | object | — |
last_errorrequired | object | Legacy free-text error. Prefer `error.code`. |
errorrequired | object | Set on `suppressed` messages: the stable skip reason and its sentence. Null otherwise. |
created_atrequired | string | — |
200401403404