Send a SMS

This endpoint is responsible for receiving requests to send SMS messages. SMS processing is performed asynchronously. Upon receiving a request, the service immediately responds with a 200 OK status, indicating that the request has been received and queued; delivery happens afterwards.

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

Title used to identify the sms delivery.

string
required
length ≤ 1600

Message that will be sent. At most 1,600 characters. Accents are removed and characters outside letters, digits, spaces and common punctuation (emoji included) are dropped before sending; credits are counted on that text: 1 up to 160 characters, ceil(length / 152) above.

phones
array of strings
required
length between 1 and 10000

An array of phone numbers as strings. Brazilian numbers are accepted with or without the country code (5511999999999, +5511999999999 or 11999999999); prefer the form with it. A mobile of a country enabled for international SMS is written with + and its country code (+61412345678), or as dialed in that country with its code in ddi. Without it, 10 or 11 digits are a national number and get 55 in front, area code 55 included (55991234567 is sent as 5555991234567). Each number may contain only digits, +, (, ) and -, and must have 10 to 16 digits. At most 10,000 numbers per request: a longer list is a 422. A body over 250 KB, around 15,000 numbers, is refused before that, with a 413.

phones*

Optional. Country calling code put in front of each number that does not carry one, as a string or a number, with or without +; 55 (Brazil) when absent — but an absent ddi and an explicit 55 are not the same (below), so leave it out unless every number of the send is of one country. Another code is accepted only for a country enabled for international SMS (today, Australia 61 and New Zealand 64), and never with is_flash; any other is a 422. A ddi the request sends (55 included) prevails: every number must be of that country, and one written with + of another country (+55 included, under another ddi) is a 422 — to mix countries, leave ddi out and write every number with +. Without ddi, a number written with + is read by its own digits, the same while no country is enabled, and the same for is_flash, which refuses with a 422 a mobile SMS would send abroad: a valid Brazilian mobile goes to Brazil (+33992761304 goes to area code 33); a valid number of a country that is not enabled (every country, while none is) or a landline is a 422; one valid in no country is accepted, charged and refused as invalid_number, never corrected into a Brazilian number nor sent. A number without +, and +55, keep today's rules, a missing ninth digit restored. An international number must be a mobile of an enabled country, valid in its numbering plan, or the request is a 422 before anything is charged. An international SMS is charged like any SMS, one credit per part, and its statuses carry the number in international format (+61412345678). See the guide How to Send an SMS, section International SMS.

boolean
Defaults to false

Defines whether the message will be sent via Flash.

string
deprecated

Deprecated. Accepted for compatibility and ignored: it has no effect on the send. When present it must be a string, or the request is a 422.

uri
length ≤ 512

Optional. URL that receives the status events (campaign.status) of this send instead of the app's webhook URL. It is called exactly as written, query string included, so it can carry your own identifiers (for example ?order=123). Replies to an SMS (sms.inbound) keep going to the app's webhook URL. Must use http or https, have a public hostname without underscores and be at most 512 characters; private and reserved addresses are refused. No authentication header is sent to it.

Response

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json