Message Media

List Message Media

Lists the MMS attachments associated with one message. Each attachment is a separate media resource that can be retrieved or deleted by SID. Fax Media contains fax documents and is a separate collection.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Messaging.

Learn more about API scopes.

get/Accounts/{AccountSid}/Messages/{MessageSid}/Media

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The unique identifier of the project that sent or received this message.

MessageSidstring uuid required

Universal Unique Identifier.

A unique ID that identifies this specific message.

Query parameters

DateCreatedstring

Only return media created on this particular date, formatted as YYYY-MM-DD in UTC.

DateCreated<string

Only return media created before this date, formatted as YYYY-MM-DD in UTC.

DateCreated>string

Only return media created after this date, formatted as YYYY-MM-DD in UTC.

Pageinteger

The page number to retrieve. Default is 0.

PageSizeinteger

The number of items per page. Default is 50, maximum is 1000.

PageTokenstring

The token for cursor-based pagination. Must start with 'PA' or 'PB'.

Response

The request has succeeded.

uristring required

The URI of the current page.

first_page_uristring required

The URI of the first page.

next_page_uristring nullable required

The URI of the next page, or null if there are no more pages.

previous_page_uristring nullable required

The URI of the previous page, or null if this is the first page.

pageinteger required

The current page number.

page_sizeinteger required

The number of items per page.

Example response

{
  "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media?Page=0&PageSize=50",
  "first_page_uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media?Page=0&PageSize=50",
  "page_size": 50,
  "media_list": [
    {
      "content_type": "image/jpeg",
      "date_created": "Mon, 13 Aug 2018 21:38:46 +0000",
      "date_updated": "Mon, 13 Aug 2018 21:38:46 +0000",
      "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media/b3877c40-da60-4998-90ad-b792e98472me.json"
    }
  ]
}

Changes

Changed in 9 of the 40 revisions of this API.10441

  • 2916d5e3072e33See the full diff
    • the media_list/items/account_sid response's property type/format changed from string/uuid to / for status 200

      response-property-type-changed

    • the media_list/items/parent_sid response's property type/format changed from string/uuid to / for status 200

      response-property-type-changed

    • the media_list/items/sid response's property type/format changed from string/uuid to / for status 200

      response-property-type-changed

    • added uuid to the media_list/items/account_sid response property allOf list for the response status 200

      response-property-all-of-added

    • added uuid to the media_list/items/parent_sid response property allOf list for the response status 200

      response-property-all-of-added

    • added uuid to the media_list/items/sid response property allOf list for the response status 200

      response-property-all-of-added

    • added 'unevaluatedProperties' constraint to the response body for the status 200

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 400

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 401

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 422

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the media_list/items/ response property for the status 200

      response-property-unevaluated-properties-added

    • response property next_page_uri list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property previous_page_uri list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • api tag Message Media added

      api-tag-added

    • api tag Media removed

      api-tag-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the non-success response with the status 400

      response-non-success-status-added

  • d5fbaaddfa3e3219See the full diff
    • for the query request parameter PageSize, default value 50 was added

      request-parameter-default-value-added

    • the response property next_page_uri became nullable for the status 200

      response-property-became-nullable

    • the response property previous_page_uri became nullable for the status 200

      response-property-became-nullable

    • for the query request parameter PageSize, the max was set to 1000.00

      request-parameter-max-set

    • for the query request parameter PageSize, the min was set to 1.00

      request-parameter-min-set

    • added the new optional query request parameter DateCreated<

      new-optional-request-parameter

    • added the new optional query request parameter DateCreated>

      new-optional-request-parameter

    • added the new optional query request parameter Page

      new-optional-request-parameter

    • added the new optional query request parameter PageToken

      new-optional-request-parameter

    • added the non-success response with the status 422

      response-non-success-status-added

    • the response property first_page_uri became required for the status 200

      response-property-became-required

    • the response property media_list became required for the status 200

      response-property-became-required

    • the response property media_list/items/account_sid became required for the status 200

      response-property-became-required

    • the response property media_list/items/content_type became required for the status 200

      response-property-became-required

    • the response property media_list/items/date_created became required for the status 200

      response-property-became-required

    • the response property media_list/items/date_updated became required for the status 200

      response-property-became-required

    • the response property media_list/items/parent_sid became required for the status 200

      response-property-became-required

    • the response property media_list/items/sid became required for the status 200

      response-property-became-required

    • the response property media_list/items/uri became required for the status 200

      response-property-became-required

    • the response property next_page_uri became required for the status 200

      response-property-became-required

    • the response property page became required for the status 200

      response-property-became-required

    • the response property page_size became required for the status 200

      response-property-became-required

    • the response property previous_page_uri became required for the status 200

      response-property-became-required

    • the response property uri became required for the status 200

      response-property-became-required

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional query request parameter DateCreated

      new-optional-request-parameter

    • added the new optional query request parameter PageSize

      new-optional-request-parameter

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response property previous_page_uri became nullable for the status 200

      response-property-became-nullable

  • 3c88f14db21e129See the full diff
    • the response's body type/format changed from / to object/ for status 200

      response-body-type-changed

    • deleted the query request parameter DateCreated

      request-parameter-removed

    • deleted the query request parameter PageSize

      request-parameter-removed

    • removed pagination subschema #2 from the response body allOf list for the response status 200

      response-body-all-of-removed

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the optional property first_page_uri to the response with the 200 status

      response-optional-property-added

    • added the optional property media_list to the response with the 200 status

      response-optional-property-added

    • added the optional property next_page_uri to the response with the 200 status

      response-optional-property-added

    • added the optional property page to the response with the 200 status

      response-optional-property-added

    • added the optional property page_size to the response with the 200 status

      response-optional-property-added

    • added the optional property previous_page_uri to the response with the 200 status

      response-optional-property-added

    • added the optional property uri to the response with the 200 status

      response-optional-property-added

    This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog