Get a message
const url = 'https://api.siprtc.io/v1/Accounts/example/Messages/example';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of the account (yours, or a direct sub-account’s)
Message sid, optionally followed by .json
Responses
Section titled “ Responses ”The message record
object
Auth ID of the account the message belongs to.
Always 2010-04-01.
Message text.
Channel, for example sms, whatsapp or viber.
Conversation the message belongs to, if any.
When the message was created, RFC 3339.
When the provider reported delivery, RFC 3339; 0001-01-01T00:00:00Z until then.
When the message was queued, RFC 3339; 0001-01-01T00:00:00Z when not reported.
When the provider reported the message sent, RFC 3339; 0001-01-01T00:00:00Z when not reported.
Always outbound-api, whatever the real direction.
Always empty.
Always empty.
Sender: a phone number in E.164 format, a sender ID, or the channel’s sender address.
Always empty.
Always “0”.
Number of segments the message was sent in.
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.
Currency of price: USD.
Message sid, as returned when the message was sent.
Latest status reported for the message, for example sent, queued, accepted, delivered, read, received, rejected or failed.
Related resources.
object
Always empty.
Path for the message’s media. Not served.
Recipient: a phone number in E.164 format or the channel’s recipient address.
Path of this record.
Provider that carried the message, for example twilio, plivo, movider, smpp, meta, cm or viber.
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")
Example generated
exampleNo such message on this account (code 20404)
object
Error code, for example 20404 for a record that does not exist.
What went wrong.
A link for more information (the API host).
HTTP status of the response.
Example
{ "code": 20404, "message": "The requested resource /v1/Accounts/AC000000000000000000/Messages/SM00000000000000000000000000000000 was not found", "more_info": "https://siprtc.io", "status": 404}