Skip to content

Get a message

GET
/v1/Accounts/{auth_id}/Messages/{sid}
curl --request GET \
--url https://api.siprtc.io/v1/Accounts/example/Messages/example \
--header 'Authorization: Basic <credentials>'

Returns the record of one message of the account by its sid, as returned when it was sent. The sid may carry a file extension, so /Messages/{sid}.json works too. status is the latest status the provider reported (for example sent, delivered, failed or received), and date_delivered is set once delivery is reported. price is the per-segment rate multiplied by num_segments. Only records of the account in the path are found: a parent account can read a direct sub-account’s messages by putting the sub-account’s Auth ID in the path. An unknown sid, or one of another account, gets 404.

auth_id
required
string

Auth ID of the account (yours, or a direct sub-account’s)

sid
required
string

Message sid, optionally followed by .json

The message record

Media type application/json
object
account_sid

Auth ID of the account the message belongs to.

string
api_version

Always 2010-04-01.

string
body

Message text.

string
channel

Channel, for example sms, whatsapp or viber.

string
conversation_id

Conversation the message belongs to, if any.

string
date_created

When the message was created, RFC 3339.

string
date_delivered

When the provider reported delivery, RFC 3339; 0001-01-01T00:00:00Z until then.

string
date_sent

When the message was queued, RFC 3339; 0001-01-01T00:00:00Z when not reported.

string
date_updated

When the provider reported the message sent, RFC 3339; 0001-01-01T00:00:00Z when not reported.

string
direction

Always outbound-api, whatever the real direction.

string
error_code

Always empty.

string
error_message

Always empty.

string
from

Sender: a phone number in E.164 format, a sender ID, or the channel’s sender address.

string
messaging_service_sid

Always empty.

string
num_media

Always “0”.

string
num_segments

Number of segments the message was sent in.

integer
price

Price in price_unit (USD). In Get a message it is the per-segment rate times num_segments; in List messages it is the per-segment rate.

number
price_unit

Currency of price: USD.

string
sid

Message sid, as returned when the message was sent.

string
status

Latest status reported for the message, for example sent, queued, accepted, delivered, read, received, rejected or failed.

string
subresource_uris

Related resources.

object
feedback

Always empty.

string
media

Path for the message’s media. Not served.

string
to

Recipient: a phone number in E.164 format or the channel’s recipient address.

string
uri

Path of this record.

string
vendor

Provider that carried the message, for example twilio, plivo, movider, smpp, meta, cm or viber.

string

Example

{
"account_sid": "AC000000000000000000",
"api_version": "2010-04-01",
"body": "Your appointment is confirmed for 10:30 tomorrow.",
"channel": "sms",
"conversation_id": "6f1c2a9e-3b7d-4c55-9d0e-1a2b3c4d5e6f",
"date_created": "2026-11-26T10:30:00Z",
"date_delivered": "2026-11-26T10:30:04Z",
"date_sent": "2026-11-26T10:30:00Z",
"date_updated": "2026-11-26T10:30:01Z",
"direction": "outbound-api",
"error_code": "",
"error_message": "",
"from": "+15555550100",
"messaging_service_sid": "",
"num_media": "0",
"num_segments": 1,
"price": 0.0075,
"price_unit": "USD",
"sid": "SM00000000000000000000000000000000",
"status": "delivered",
"subresource_uris": {
"feedback": "",
"media": "/v1/Accounts/AC000000000000000000/Messages/SM00000000000000000000000000000000/Media.json"
},
"to": "+15555550123",
"uri": "/v1/Accounts/AC000000000000000000/Messages/SM00000000000000000000000000000000.json",
"vendor": "twilio"
}

Missing or wrong credentials, or the path account is neither yours nor a direct sub-account’s (body: "Authentication failed")

Media type application/json
string

Example generated

example

No such message on this account (code 20404)

Media type application/json
object
code

Error code, for example 20404 for a record that does not exist.

integer
message

What went wrong.

string
more_info

A link for more information (the API host).

string
status

HTTP status of the response.

integer

Example

{
"code": 20404,
"message": "The requested resource /v1/Accounts/AC000000000000000000/Messages/SM00000000000000000000000000000000 was not found",
"more_info": "https://siprtc.io",
"status": 404
}