Rate this page:

SMS Messages [Deprecated]

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.

SMS Message Instance Resource

This resource represents an individual SMS message.

Resource URI


Resource Properties

An SMS Message resource is represented by the following properties:

Property Description
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 queued, sending, sent,failed, or received.
Direction The direction of this SMS message. inbound for incoming messages, outbound-api for messages initiated via the REST API, outbound-call for messages initiated during a call or outbound-reply for messages initiated in response to an incoming SMS.
Price The amount billed for the message, in the currency associated with the account.
PriceUnit The currency in which Price is measured, in ISO 4127 format (e.g. usd, eur, jpy).
ApiVersion The version of the Twilio API used to process the SMS message.
Uri The URI for this resource, relative to

SMS Status Values

The following are the possible values for the 'Status' parameter.

Status Description
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 single SMS message specified by the provided {SMSMessageSid}.

Retrieve an SMS


        HTTP POST

        Not supported.

        HTTP PUT

        Not supported.


        Not supported.

        SMS Messages List Resource

        Resource URI


        HTTP GET

        Returns a list of SMS messages associated with your account. The list includes paging information.

        List Filters

        You may limit the list by providing certain query string parameters to the listing resource. Note, parameters are case-sensitive:

        Parameter Description
        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 YYYY-MM-DD. Example: DateSent=2009-07-06. You can also specify inequality, such as DateSent<=YYYY-MM-DD for SMS messages that were sent on or before midnight on a date, and DateSent>=YYYY-MM-DD for SMS messages sent on or after midnight on a date.

        List Messages

        Grab the whole list of messages.


              HTTP POST

              Sends a new SMS message. For details see the Sending SMS section.

              HTTP PUT

              Not supported.

              HTTP DELETE

              Not supported.

              Rate this page:

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.


                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    Refer us and get $10 in 3 simple steps!

                    Step 1

                    Get link

                    Get a free personal referral link here

                    Step 2

                    Give $10

                    Your user signs up and upgrade using link

                    Step 3

                    Get $10

                    1,250 free SMSes
                    OR 1,000 free voice mins
                    OR 12,000 chats
                    OR more