The SMS/Messages resource has been deprecated, replaced by the Messages resource, and may be removed in future versions of the Twilio API.
Since the Messages resource is a superset of SMS/Messages, we recommend its use going forward.
An SMS Message instance resource represents an inbound or outbound SMS message. Whenever someone sends an SMS message to one of your Twilio numbers, or when you send an SMS message via the REST API or using the
<Sms> verb, Twilio creates an SMS Message instance resource and associates it with your account.
The SMS Messages list resource represents the set of SMS messages sent from and received by an account.
|Sid||A 34 character string that uniquely identifies this resource.|
|DateCreated||The date that this resource was created, given in RFC 2822 format.|
|DateUpdated||The date that this resource was last updated, given in RFC 2822 format.|
|DateSent||The date that the SMS was sent. For incoming messages, this is the date that Twilio received the SMS. The date is given in RFC 2822 format.|
|AccountSid||The unique id of the Account that sent this SMS message.|
|From||The phone number that initiated the message in E.164 format. For incoming messages, this will be the remote phone. For outgoing messages, this will be one of your Twilio phone numbers.|
|To||The phone number that received the message in E.164 format. For incoming messages, this will be one of your Twilio phone numbers. For outgoing messages, this will be the remote phone.|
|Body||The text body of the SMS message. Up to 160 characters long.|
|Status||The status of this SMS message. Either
|Direction||The direction of this SMS message.
|Price||The amount billed for the message, in the currency associated with the account.|
|PriceUnit||The currency in which
|ApiVersion||The version of the Twilio API used to process the SMS message.|
|Uri||The URI for this resource, relative to
The following are the possible values for the 'Status' parameter.
|queued||The API request to send an SMS message was successful and the message is queued to be sent out.|
|sending||Twilio is in the process of dispatching your message to the nearest upstream carrier in the SMS network.|
|sent||The message was sent to the nearest upstream carrier, and that carrier accepted the message.|
|failed||The message could not be sent, most likely because the "To" number is non-existent.|
|received||On inbound messages only. The message was received by one of your Twilio numbers.|
Returns a list of SMS messages associated with your account. The list includes paging information.
You may limit the list by providing certain query string parameters to the listing resource. Note, parameters are case-sensitive:
|To||Only show SMS messages to this phone number.|
|From||Only show SMS messages from this phone number.|
|DateSent||Only show SMS messages sent on this date (in GMT format), given as
Grab the whole list of messages.