Skip to content

List messages

GET
/v1/Accounts/{auth_id}/Messages
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.

auth_id
required
string

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

Page
integer
0

Page number; 0 and 1 are both the first page

PageSize
integer
default: 50

Records per page

One page of message records

Media type application/json
object
end

Offset just past the last record this page can hold (start + page_size).

integer
first_page_uri

URI of the first page (no leading slash).

string
messages

Records on this page, newest first; null when the page is empty.

Array<object>
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
next_page_uri

URI of the next page (no leading slash). Always set, even on the last page.

string
page

Page number as requested.

integer
page_size

Page size used.

integer
previous_page_uri

URI of the previous page (no leading slash); empty on page 0.

string
start

Offset of the first record on this page.

integer
uri

URI of this page (no leading slash).

string

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")

Media type application/json
string

Example generated

example