Skip to main content

Send an SMS

Sends one message to one subscriber of your service.

POST /api/sp/v1/sms

The older path POST /api/sp/v1/dcb/sms is the same endpoint and stays supported. Use either; new integrations should use /sms. Both share one idempotency namespace, so a spTransactionId spent on one is spent on the other.

Request​

FieldTypeNotes
msisdnstringThe recipient.
serviceIdintegerThe service the message belongs to.
messagestringThe text. Plain text, not hex.
spTransactionIdstringYours, unique per attempt.

Response​

{
"requestId": "01JB2K9WQ4X7YH3M8N5P6R7T8V",
"code": "OK",
"data": { "messageId": "9183", "characters": 16 }
}
FieldNotes
messageIdOurs. Quote it in a support request about a specific message.
charactersHow many characters we counted, as unicode characters rather than bytes.

Success means queued, not delivered. Delivery is a network event that happens after this call returns, and this endpoint does not report it.

characters is worth checking on your first integration. If it disagrees with your own count, the difference is almost always invisible characters or a different idea of what one character is - and since the length limit is enforced on our count, ours is the one that decides.

Legacy fields are refused, not ignored​

msg and alphanumeric are prohibited. If you send either, the call fails validation.

This is deliberate. On the legacy platform msg carried hex-encoded text and alphanumeric set a sender ID. Accepting them silently would mean either double-encoding your message or quietly ignoring a sender you asked for. A loud refusal is better than either: see Migration from legacy.

The sender is derived from the service's short code and is not something a request can set.

Length​

A long message is no longer refused. It is delivered as several parts, which the handset joins back into one message for the reader. CONTENT_TOO_LONG is not returned by this endpoint.

Where a message becomes two parts depends on your text, not on your service: 160 characters for English, 70 for Arabic or Kurdish. One Arabic character anywhere moves the whole message to the 70 boundary, so a mixed-language message is measured at 70, not 160. Past the first part the capacity per part is slightly smaller (153 and 67), because the joining header takes room: 161 English characters is two parts, not 160 plus one.

Length costs you nothing on this endpoint. Send SMS goes out on a zero-rated account whatever the short code's price is, so parts affect delivery and not billing. That is only true here: content added through Add Content is charged per subscriber, and there the part count multiplies the charge.

The characters count in the response is what we measured, in unicode characters rather than bytes.

Delivery is reported once for the whole message

However many parts a message becomes, you get one delivery outcome for it, not one per part.

Other limits​

Services may be configured to deliver only on certain days (CONTENT_NOT_ALLOWED_TODAY).

Sends through this endpoint do not spend the subscriber's daily content budget, because they do not charge the subscriber. That budget bounds what someone pays, and CONTENT_LIMIT_EXCEEDED is not currently returned by this endpoint at all.

Messaging someone who is not subscribed to the service is refused NOT_SUBSCRIBED unless your grant has been opened for it; that is set per service by the Tornet operations team.

A number the operator has blacklisted is refused SUBSCRIBER_BLACKLISTED (403) and nothing is queued. This applies to a number blacklisted for every service, or for this service. Don't retry it on any channel. The subscription check comes first: if your grant may only message subscribers, a blacklisted number that isn't subscribed is refused NOT_SUBSCRIBED, the same as any other unsubscribed number.