Messages

List all Messages

List all messages.

Permissions

The API token must include the following scopes: Messaging.

get/Accounts/{AccountSid}/Messages

Path parameters

AccountSidstring uuid required

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

Query parameters

DateCreatedstring

The date, in RFC 2822 format, on which the message was created.

DateSentstring

The date, in RFC 2822 format, on which the message was sent.

Fromstring

The phone number, in E.164 format, that sent the message.

Tostring

The phone number, in E.164 format, that received the message.

Response

The request has succeeded.

uristring

The URI of the current page.

first_page_uristring

The URI of the first page.

next_page_uristring

The URI of the next page.

previous_page_uristring

The URI of the previous page.

pageinteger

The current page number.

page_sizeinteger

The number of items per page.

Example response

{
  "uri": "/api/laml/2010-04-01/Accounts?Page=0&PageSize=50",
  "first_page_uri": "/api/laml/2010-04-01/Accounts?Page=0&PageSize=50",
  "next_page_uri": "/api/laml/2010-04-01/Accounts?Page=1&PageSize=50",
  "page_size": 50,
  "messages": [
    {
      "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
      "api_version": "2010-04-01",
      "body": "Hello World!",
      "num_segments": 1,
      "num_media": "1",
      "date_created": "Mon, 13 Aug 2018 21:38:46 +0000",
      "date_sent": "Mon, 13 Aug 2018 21:38:46 +0000",
      "date_updated": "Mon, 13 Aug 2018 21:38:46 +0000",
      "error_code": "30001",
      "error_message": "Queue overflow",
      "from": "+15551234567",
      "price": 0.005,
      "price_unit": "USD",
      "sid": "0a059168-ead0-41af-9d1f-343dae832527",
      "to": "+15557654321",
      "messaging_service_sid": "b3877c40-da60-4998-90ad-b792e98472ms",
      "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527.json",
      "subresource_uris": {
        "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media.json"
      }
    }
  ]
}

Changes