Send an 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

RESPONSE PARAMETERS

KEYDESCRIPTION
trackingIdThe tracking id used to identify the message.
createdAtThe date that this resource was created.
fromThe sender Id of the message.
toThe phone number the message is about to be sent to.
bodyThe message you sent.
statusThe status of the SMS. Check here for possible values.
labelThe label that was given to the SMS.
bodyAnalysisThe analysis for the body of the SMS.
bodyAnalysis.charactersThe total number of characters of the message body.
bodyAnalysis.partsThe number of actual SMS that will be sent.
bodyAnalysis.transcodeContains information for the transcoded body of the SMS message. This will be available only if the message can be transcoded.
bodyAnalysis.transcode.messageThe transcoded message of the original unicode message.
bodyAnalysis.transcode.partsThe number of the parts of the transcoded message.
bodyAnalysis.unicodeIndicates if the body contains unicode characters.
bodyAnalysis.unsupportedGSMCharactersWhich characters caused the message to be considered as unicode.
flashIndicates if the message is flash SMS.
callbackDefines the notification callback information for an individual SMS message. You can also set this value from Routee Dev Platform on the Applications menu.
callback.urlThe 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.strategyWhen the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).
ttlThe 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

STATUSCODEDESCRIPTION
400400001009You don't have enough balance to send the SMS.
400400005000The sender id is invalid.
400400000000Validation Error.
A required field is missing.
Invalid value of a field.
401You are unauthorized.
Invalid access token, maybe has expired.
403403000000Access denied.
Your application's access token does not have the right to use SMS service.
Body Params
string
required

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length of 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

string
required

The message you want to send. Use "\n" to create a new line in your message.

string
required

The destination phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

boolean
Defaults to false

Indicates if the SMS is a flash SMS. A flash SMS is a type of SMS that appears directly on the main screen without user interaction and is not automatically stored in the inbox. It can be useful in emergencies, such as a fire alarm or cases of confidentiality, as in delivering one-time passwords. Default value false.

string

A generic label which can be used for tagging the SMS. The maximum length is 350 characters.

callback
object

Defines the callback information for an individual message. Check here for payload information. You can also set this value from Routee Platform on the Applications menu.

int32
Defaults to 4320

The duration in minutes the delivery of an SMS will be attempted. Must be between 1-4320. By default Routee will attempt delivery for 72 hours. If the SMS is not delivered within the validity period, then the SMS status will be "Undelivered", with "detailedStatus": "Expired".

boolean

If “transcode” is set to true/false, then the message body will be/not be transcoded. If the “transcode” parameter is not set, then the application level setting will be used. In case the message can be sent as UTF in one part, it will not be transcoded.

urlShortener
object

[OPTIONAL] If present, each link that exist in message body will be replaced by a Shortened URL. NOTE: Links are recognized by the prefix "http://" or "https://" and are separated by the next word or character with space. Keep in mind that adding any character like '.' ',' etc, other than space at the end of the link, will be recognized as part of the url and it will result to a shortened url that redirects to a wrong destination.

restrictions
object

[OPTIONAL] Provide the registered Content Template ID and Principal Entity ID to ensure the message is not rejected by TRAI regulations.

Headers
string
required
Defaults to application/json

application/json

string
required
Defaults to Bearer {access_token}

Bearer {access_token}

Response

Language
LoadingLoading…
Response
Choose an example:
application/json