Create a Message
Changed onSends a message through the account and creates a Message resource for tracking its delivery. Use this form-encoded route for SID-based integrations; use SignalWire REST Send a message for a JSON request.
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.
Request
- Base URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
- URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages
- AuthHTTP basic
Path parameters
Universal Unique Identifier.
The unique identifier of the project that sent or received this message.
Request body application/x-www-form-urlencoded
Example request
{
"To": "+15557654321",
"From": "+15551234567",
"Body": "Hello World!",
"MaxPrice": "0.0075",
"StatusCallback": "https://example.com/status-callback",
"ValidityPeriod": 14400
}Response
Response returned when a message is created.
Example response
{
"api_version": "2010-04-01",
"body": "Hello World!",
"num_segments": 1,
"num_media": 1,
"date_created": "Mon, 13 Aug 2018 21:38:46 +0000",
"date_sent": "Mon, 13 Aug 2018 21:38:46 +0000",
"date_updated": "Mon, 13 Aug 2018 21:38:46 +0000",
"error_code": "30001",
"error_message": "Queue overflow",
"from": "+15551234567",
"price": 0.005,
"price_unit": "USD",
"to": "+15557654321",
"uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527.json",
"subresource_uris": {
"media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media.json"
}
}Changes
- breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
the
response's property type changed fromstringto no type, and format fromuuidto no format for status - breaking
the
response's property format changed fromuuidto no format for status - breaking
the
response's property type changed fromstringto no type, and format fromuuidto no format for status - info
the
request property type was generalized fromstringto no type, and format fromuuidto no format - info
the
request property type was generalized fromstringto no type, and format fromuuidto no format - info
added to the
response propertyallOflist for the response status - info
added to the
response propertyallOflist for the response status - info
added to the
response propertyanyOflist for the response status - info
removed
subschema #1from theresponse propertyanyOflist for the response status
- breaking
- breaking
added 'unevaluatedProperties' constraint to the request body
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the
////response property for the status
- breaking