Send message

Sends an SMS message to a recipient using a mask of the account. The send is **asynchronous**: the API responds `202 Accepted` immediately with a `message_id`; the delivery status (`SENT`, `DELIVERED`, `FAILED`) is notified later through the status webhook, correlated by that `message_id`. When the text contains characters outside the GSM-7 alphabet (accents, `ñ`, emoji), send `has_accents: true` so the message is encoded in UCS-2; this reduces the maximum size per segment. When a `complement` is sent, a trackable short link is generated and automatically appended to the end of the text before sending.

Authentication

x-api-keystring

Account authentication key. The App-Key must have the SMS channel enabled; it cannot be used against the endpoints of other channels.

Request

This endpoint expects an object.
maskstringRequired

Sender mask identifier obtained through GET /v1/sms/masks.

tostringRequiredformat: "^\d{10,15}$"

Destination number, digits only. National sends: exactly 10 digits, without the country code. International sends (is_international: true): full number with its country code (10 to 15 digits).

textstringRequired
Text of the message.
is_internationalbooleanOptionalDefaults to false

Send true for an international destination (to carries the full number with its country code). The mask must support international sends (errorCode 356 otherwise).

has_accentsbooleanOptionalDefaults to false

Send true when the text contains accents, ñ, or other characters outside the GSM-7 alphabet. The message is encoded in UCS-2, which reduces the maximum size per segment.

complementobjectOptional
Appends a trackable short link to the end of the message. The link is shortened and added to the text automatically before sending.

Response

Message accepted and queued for delivery. Store message_id: it is the key to correlate the status webhooks of this send.

statusCodeintegerOptional
message"ACCEPTED"Optional
Initial status of the send.
message_idstringOptionalformat: "uuid"

Send identifier. Store it: it is the key to correlate the status webhooks of this send.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error