Retrieve a list of Media resources belonging to the account used to make the request
The Media resource represents a piece of media, such as an image, that is associated with a message.
Retrieve a list of Media resources belonging to the account used to make the request
Path parameters
-
The SID of the Account that created the Media resource(s) to read.
-
The SID of the Message resource that this Media resource belongs to.
Query parameters
-
DateCreated string(date-time)
Only include media that was created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read media that was created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read media that was created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read media that was created on or after midnight of this date. -
DateCreated< string(date-time)
Only include media that was created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read media that was created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read media that was created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read media that was created on or after midnight of this date. -
DateCreated> string(date-time)
Only include media that was created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read media that was created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read media that was created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read media that was created on or after midnight of this date. -
PageSize integer
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
.
curl \
-X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json \
--user "username:password"
{
"end": 42,
"first_page_uri": "https://example.com",
"media_list": [
{
"account_sid": "string",
"content_type": "string",
"date_created": "string",
"date_updated": "string",
"parent_sid": "string",
"sid": "string",
"uri": "https://example.com"
}
],
"next_page_uri": "https://example.com",
"page": 42,
"page_size": 42,
"previous_page_uri": "https://example.com",
"start": 42,
"uri": "https://example.com"
}
{
"end": 42,
"first_page_uri": "https://example.com",
"media_list": [
{
"account_sid": "string",
"content_type": "string",
"date_created": "string",
"date_updated": "string",
"parent_sid": "string",
"sid": "string",
"uri": "https://example.com"
}
],
"next_page_uri": "https://example.com",
"page": 42,
"page_size": 42,
"previous_page_uri": "https://example.com",
"start": 42,
"uri": "https://example.com"
}