Search + K

Command Palette

Search for a command to run...

Sign In

Retrieve a list of Message resources associated with a Twilio Account

GET /2010-04-01/Accounts/{AccountSid}/Messages.json
Copy endpoint
https://api.twilio.com

Retrieve a list of Message resources associated with a Twilio Account

Parameters

path Path Parameters

Name Type
AccountSid required

The SID of the Account associated with the Message resources.

`AC${string}`

query Query Parameters

Name Type
To

Filter by recipient. For example: Set this to parameter to +15558881111 to retrieve a list of Message resources with to properties of +15558881111

string
From

Filter by sender. For example: Set this from parameter to +15552229999 to retrieve a list of Message resources with from properties of +15552229999

string
DateSent

Filter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), <=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and >=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).

string
DateSent<

Filter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), <=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and >=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).

string
DateSent>

Filter by Message sent_date. Accepts GMT dates in the following formats: YYYY-MM-DD (to find Messages with a specific sent_date), <=YYYY-MM-DD (to find Messages with sent_dates on and before a specific date), and >=YYYY-MM-DD (to find Messages with sent_dates on and after a specific date).

string
PageSize

How many resources to return in each list page. The default is 50, and the maximum is 1000.

number
Page

The page index. This value is simply for client state.

number
PageToken

The page token. This is provided by the API.

string

Responses

200 application/json

OK

{
messages?: ApiV2010AccountMessage
interface ApiV2010AccountMessage {
body?: string | null;
num_segments?: string | null;
direction?: MessageEnumDirection;
from?: string | null;
to?: string | null;
date_updated?: string | null;
price?: string | null;
error_message?: string | null;
uri?: string | null;
account_sid?: `AC${string}` | null;
num_media?: string | null;
status?: MessageEnumStatus;
messaging_service_sid?: `MG${string}` | null;
sid?: string | null;
date_sent?: string | null;
date_created?: string | null;
error_code?: number | null;
price_unit?: string | null;
api_version?: string | null;
subresource_uris?: {} | null;
}
[]
;
end?: number;
first_page_uri?: string;
next_page_uri?: string | null;
page?: number;
page_size?: number;
previous_page_uri?: string | null;
start?: number;
uri?: string;
}