Skip to main content

SMS Details

Retrieve the details and delivery status of a specific SMS message.

Path Parameters​

ParameterRequiredDescription
SmsSidMandatoryThe unique SMS identifier returned when the message was sent

Code Examples​

curl -u '<api_key>:<api_token>' https://api.exotel.com/v1/Accounts/<your_sid>/SMS/Messages/<SmsSid>.json

Response​

{
"SMSMessage": {
"Sid": "sms_sid_value",
"AccountSid": "your_sid",
"From": "EXOTEL",
"To": "+919876543210",
"Body": "Your OTP is 123456",
"Status": "sent",
"DetailedStatusCode": 20005,
"DetailedStatus": "DELIVERED_TO_HANDSET",
"DateCreated": "2024-01-15 10:30:00",
"DateUpdated": "2024-01-15 10:30:05",
"DateSent": "2024-01-15 10:30:02",
"Price": 0.18,
"Uri": "/v1/Accounts/your_sid/SMS/Messages/sms_sid_value"
}
}

Response Fields​

FieldTypeDescription
SidStringUnique SMS identifier
StatusStringHigh-level status: queued, sending, submitted, sent, failed, failed-dnd
DetailedStatusCodeIntegerNumeric status code (see Status Codes)
DetailedStatusStringHuman-readable status description
DateCreatedDateTimeWhen the request was received
DateSentDateTimeWhen the SMS was sent to the operator
DateUpdatedDateTimeLast status update timestamp
PriceDoubleAmount charged

Error Codes​

HTTP CodeAPI Error CodeScenario
200—SID not found — returns "No matching results" (not a 404)
42940403Too many GET requests
40040501Invalid parameters in the request URL
40340002Account inactive
401—Auth key or token missing
40134010Invalid auth key or token
40334009Account SID missing or action forbidden on resource
note

A 200 response with "No matching results" means the SID was not found — this is not an error HTTP status code.

Try It​