This API method allows you to programmatically retrieve details about a previously sent or received SMS message.
Your account and property must be enabled for SMS. Please contact client services to have SMS enabled.
SMS messages are retrieved using the following call.
|MessageSid||string||The secure identifier of the message.|
200 - OK
On successful retrieval of the SMS message, a
200 OK is returned with a JSON formatted
Message Resource instance.
Note that all
timestamp fields are specified as seconds since the unix epoch and all represented within UTC.
Message Resource Parameters
|MessageSid||string||The message secure identifier which uniquely identifies this message.|
|AccountSid||string||The account secure identifier associated with the message.|
|PropertySid||string||The property secure identifier associated with the message.|
|From||string||The alphanumeric or E164 formatted sender ID of the message.|
|To||string||The E164 formatted recipient of the SMS message.|
|Text||string||The content of the SMS message.|
|DeliveryReceipt||boolean||Set to |
true if a delivery receipt was requested and
|NumSegments||integer||The number of message segments.|
|Status||string||The message status. See below table for possible values.|
|Direction||string||The direction of the message (as a response to this request always |
Transmit. Possible values:
|Scheduled||timestamp||Timestamp of when the message is/was scheduled to be sent.|
|Created||timestamp||Timestamp of when the message resource was created.|
|Submitted||timestamp||Timestamp of when the message was submitted to the SMS Center.|
|Delivered||timestamp||Timestamp of when the message delivery occurred.|
|Received||timestamp||Timestamp of when an inbound message was received.|
|ErrorCode||string||Error code (if message submission or delivery failed).|
|ExternalId||string||user-defind id provided when sending the message.|Example: An example response to the successful retrieval of the SMS.
"Text": "You call that an antenna?",
Description of possible status values
|Processing||The message has been received by our system and is being processed.|
|Submitted||The message has been submitted successfully to the SMS Center.|
|Delivered||The message has been delivered successfully (if delivery receipts are activated).|
|Failed||The message has failed (submission to the SMS Center was not possible within a reasonable time limit).|
|Received||The message has been received (for inbound messages).|
400 - Error
For error codes and messages, please refer to the REST API Error Codes page.