Create
Use this endpoint for the Media method to send an outbound message from one of your SignalWire phone numbers.
Path parameters
AccountSid
The unique identifier of the project that sent or received this message.
Request
To
The phone number in E.164 format that will receive the message.
From
The phone number in E.164 format that will send the message. Either `From` or `MessagingServiceSid` must be provided.
Body
The text of the message. Either `Body` or `MediaUrl` must be provided.
MediaUrl
URL(s) of media you wish to attach and send with the message. Can be specified multiple times for up to 8 media items.
SendAsMms
When set to true, forces the message to be sent as an MMS.
ApplicationSid
The SID of a SignalWire cXML Application used to configure the message's status callback.
MaxPrice
The maximum price in USD acceptable for the message to be sent. Format: decimal with up to 4 decimal places.
StatusCallback
A URL endpoint to receive callbacks each time the status of the message changes. See the [SMS status callback](/docs/compatibility-api/rest/messages/webhooks/sms-status-callback) webhook for the payload your URL will receive.
ValidityPeriod
The number of seconds a message will allow being queued before canceling. Must be between 1 and 172800 (48 hours). Default is 14400 (4 hours).
MessagingServiceSid
The ID of a number group to use when sending the message. Either `From` or `MessagingServiceSid` must be provided.
Response
account_sid
The unique identifier of the project that sent or received this message.
api_version
The version number of the SignalWire cXML REST API used to handle this message.
body
The text of the message. Up to 1600 characters long. May be null if filtered for spam.
num_segments
The number of segments that make up the entire message.
num_media
The number of media files that were included with the message.
date_created
The date and time the message was created in RFC 2822 format.
date_sent
The date and time the message was sent in RFC 2822 format, or null if not yet sent.
date_updated
The date and time the message was last updated in RFC 2822 format.
direction
The direction of the message.
Allowed values:
error_code
If an error has occurred on the message, the error code will give you a specific code, or null if no error.
error_message
A human readable description of the error that occurred, or null if no error.
from
The phone number in E.164 format that sent the message.
price
The cost of the individual message billed to your project, or null if not yet calculated.
price_unit
The currency in which `price` is charged as.
sid
A unique ID that identifies this specific message.
status
Current status of the message.
to
The phone number in E.164 format that received the message.
messaging_service_sid
If a number group was used when sending an outbound message, the number group's ID will be present, or null otherwise.
uri
The URI of this particular message.
subresource_uris
The URIs for any subresources associated with this message.