Fetch a message belonging to the account used to make the request

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

A Message resource represents an inbound or outbound message.

Fetch a message belonging to the account used to make the request

Path parameters

  • AccountSid string Required

    The SID of the Account that created the Message resource to fetch.

  • Sid string Required

    The Twilio-provided string that uniquely identifies the Message resource to fetch.

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

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

    • api_version string | null

      The API version used to process the message

    • body string | null

      The message text

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

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

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

      The RFC 2822 date and time in GMT when the message was sent

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

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

    • direction string | null

      The direction of the message

      Values are inbound, outbound-api, outbound-call, or outbound-reply.

    • error_code integer | null

      The error code associated with the message

    • error_message string | null

      The description of the error_code

    • from string(phone-number) | null

      The phone number that initiated the message

    • The SID of the Messaging Service used with the message.

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

    • num_media string | null

      The number of media files associated with the message

    • num_segments string | null

      The number of messages used to deliver the message body

    • price string | null

      The amount billed for the message

    • price_unit string(currency) | null

      The currency in which price is measured

    • sid string | null

      The unique string that identifies the resource

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

    • status string | null

      The status of the message

      Values are queued, sending, sent, failed, delivered, undelivered, receiving, received, accepted, scheduled, read, partially_delivered, or canceled.

    • subresource_uris object(uri-map) | null

      A list of related resources identified by their relative URIs

    • to string | null

      The phone number that received the message

    • uri string | null

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

GET /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json \
 --user "username:password"
Response examples (200)
{
  "account_sid": "string",
  "api_version": "string",
  "body": "string",
  "date_created": "string",
  "date_sent": "string",
  "date_updated": "string",
  "direction": "inbound",
  "error_code": 42,
  "error_message": "string",
  "from": "string",
  "messaging_service_sid": "string",
  "num_media": "string",
  "num_segments": "string",
  "price": "string",
  "price_unit": "string",
  "sid": "string",
  "status": "queued",
  "subresource_uris": {},
  "to": "string",
  "uri": "string"
}