post https://connect.routee.net/sms
Sending a single SMS is one of the most common tasks performed on the Routee Platform. Sending a message is as simple as POST-ing to the SMS resource. This is a paid service. For pricing check here.
RESPONSE PARAMETERS
KEY | DESCRIPTION |
---|---|
trackingId | The tracking id used to identify the message. |
createdAt | The date that this resource was created. |
from | The sender Id of the message. |
to | The phone number the message is about to be sent to. |
body | The message you sent. |
status | The status of the SMS. Check here for possible values. |
label | The label that was given to the SMS. |
bodyAnalysis | The analysis for the body of the SMS. |
bodyAnalysis.characters | The total number of characters of the message body. |
bodyAnalysis.parts | The number of actual SMS that will be sent. |
bodyAnalysis.transcode | Contains information for the transcoded body of the SMS message. This will be available only if the message can be transcoded. |
bodyAnalysis.transcode.message | The transcoded message of the original unicode message. |
bodyAnalysis.transcode.parts | The number of the parts of the transcoded message. |
bodyAnalysis.unicode | Indicates if the body contains unicode characters. |
bodyAnalysis.unsupportedGSMCharacters | Which characters caused the message to be considered as unicode. |
flash | Indicates if the message is flash SMS. |
callback | Defines the notification callback information for an individual SMS message. You can also set this value from Routee Dev Platform on the Applications menu. |
callback.url | The URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Network Error. When Routee POSTs back to your service, a HTTP 200 OK response must be returned. If Routee doesn't receive a 200 OK response, it will try to POST again (up to 5 times). |
callback.strategy | When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion). |
ttl | The duration in minutes the delivery of an SMS will be attempted. If the SMS is not delivered within the validity period, then the SMS status will be "Undelivered", with "detailedStatus": "Expired" |
ERROR CODES
STATUS | CODE | DESCRIPTION |
---|---|---|
400 | 400001009 | You don't have enough balance to send the SMS. |
400 | 400005000 | The sender id is invalid. |
400 | 400000000 | Validation Error. A required field is missing. Invalid value of a field. |
401 | You are unauthorized. Invalid access token, maybe has expired. | |
403 | 403000000 | Access denied. Your application's access token does not have the right to use SMS service. |