Retrieve a list of Media resources belonging to the account used to make the request

GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json

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

  • AccountSid string Required

    The SID of the Account that created the Media resource(s) to read.

  • MessageSid string Required

    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 as StartTime<=YYYY-MM-DD, to read media that was created on or before midnight of this date, and StartTime>=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 as StartTime<=YYYY-MM-DD, to read media that was created on or before midnight of this date, and StartTime>=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 as StartTime<=YYYY-MM-DD, to read media that was created on or before midnight of this date, and StartTime>=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 is 1000.

Responses

  • OK

    Hide response attributes Show response attributes object
    • end integer
    • first_page_uri string(uri)
    • media_list array[object]
      Hide media_list attributes Show media_list attributes array[object]
      • account_sid string | null

        The SID of the Account that created this resource

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • content_type string | null

        The default mime-type of the media

      • date_created string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that this resource was created

      • date_updated string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that this resource was last updated

      • parent_sid string | null

        The SID of the resource that created the media

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^(SM|MM)[0-9a-fA-F]{32}$.

      • sid string | null

        The unique string that identifies this resource

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ME[0-9a-fA-F]{32}$.

      • uri string(uri) | null

        The URI of this resource, relative to https://api.twilio.com

    • next_page_uri string(uri)
    • page integer
    • page_size integer
    • start integer
    • uri string(uri)
GET /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json \
 --user "username:password"
Response examples (200)
{
  "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"
}
Response examples (200)
{
  "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"
}