List messages
const url = 'https://api.siprtc.io/v1/Accounts/example/Messages?Page=0&PageSize=50';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?Page=0&PageSize=50' \ --header 'Authorization: Basic <credentials>'Lists the account’s message records (SMS, WhatsApp, Viber and the other channels that keep one), newest first. The same list is served at /Messages.json.
Paging: PageSize defaults to 50; Page counts from 0, but pages 0 and 1 both return the first page, so step from 1 when walking the list (the next_page_uri of page 0 points at page 1, which repeats it). The page URIs in the response have no leading slash. There is no total count; an empty page has messages set to null.
Unlike Get a message, price here is the per-segment rate, not multiplied by num_segments. Only records of the account in the path are listed: a parent account can list a direct sub-account’s messages by putting the sub-account’s Auth ID in the path; a parent’s list does not include its sub-accounts’ messages.
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)
Query Parameters
Section titled “ Query Parameters ”Page number; 0 and 1 are both the first page
Records per page
Responses
Section titled “ Responses ”One page of message records
object
Offset just past the last record this page can hold (start + page_size).
URI of the first page (no leading slash).
Records on this page, newest first; null when the page is empty.
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.
URI of the next page (no leading slash). Always set, even on the last page.
Page number as requested.
Page size used.
URI of the previous page (no leading slash); empty on page 0.
Offset of the first record on this page.
URI of this page (no leading slash).
Example
{ "end": 50, "first_page_uri": "v1/Accounts/AC000000000000000000/Messages.json?PageSize=50&Page=0", "messages": [ { "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" } ], "next_page_uri": "v1/Accounts/AC000000000000000000/Messages.json?PageSize=50&Page=1", "page": 0, "page_size": 50, "previous_page_uri": "", "start": 0, "uri": "v1/Accounts/AC000000000000000000/Messages.json?PageSize=50&Page=0"}Missing or wrong credentials, or the path account is neither yours nor a direct sub-account’s (body: "Authentication failed")
Example generated
example