Retrieve a Message

View as Markdown

Retrieve a single message.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Messaging.

Learn more about API scopes.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier of the project that sent or received this message.
SidstringRequiredformat: "uuid"
A unique ID that identifies this specific message.

Response

The request has succeeded.
account_sidstringformat: "uuid"
The unique identifier of the project that sent or received this message.
api_versionstring
The version number of the SignalWire cXML REST API used to handle this message.
bodystring or null
The text of the message. Up to 1600 characters long. May be null if filtered for spam.
num_segmentsinteger
The number of segments that make up the entire message.
num_mediainteger
The number of media files that were included with the message.
date_createdstring
The date and time the message was created in RFC 2822 format.
date_sentstring or null
The date and time the message was sent in RFC 2822 format, or null if not yet sent.
date_updatedstring
The date and time the message was last updated in RFC 2822 format.
directionenum
The direction of the message.
Allowed values:
error_codestring or null
If an error has occurred on the message, the error code will give you a specific code, or null if no error.
error_messagestring or null
A human readable description of the error that occurred, or null if no error.
fromstring
The phone number in E.164 format that sent the message.
pricedouble or null
The cost of the individual message billed to your project, or null if not yet calculated.
price_unitstring

The currency in which price is charged as.

sidstringformat: "uuid"
A unique ID that identifies this specific message.
statusenum
Current status of the message.
tostring
The phone number in E.164 format that received the message.
messaging_service_sidstring or nullformat: "uuid"
If a number group was used when sending an outbound message, the number group's ID will be present, or null otherwise.
uristring
The URI of this particular message.
subresource_urisobject
The URIs for any subresources associated with this message.

Errors