Dev Portal
Sandbox operational5 APIs5 groups11 operations

Catalog/Messaging/SMS

SMS

v1.4.1Sandbox ready

Send transactional SMS from your sender ID. Delivery reports arrive on your callback URL.

New in 1.4.1Messages over 160 characters are now split and billed per part.

DownloadOpenAPI (JSON)OpenAPI (YAML)Postman collectionGenerated clients

Authentication

Swap your keys for a token

Send your app's consumer key and secret to the token endpoint using HTTP Basic auth. You get a bearer token that lasts one hour. Send it in the Authorization header of every call.

Sandbox base URL https://devportal.softwaregroup.com/api/sandbox

Get keys for Messaging
curl -X POST 'https://devportal.softwaregroup.com/api/sandbox/oauth/v1/token' \
  -u "$LANGO_KEY:$LANGO_SECRET" \
  -d 'grant_type=client_credentials'
Result by callback

Send a text message

POST/messaging/v1/sms

Request body

senderIdstringrequired
Your registered alphanumeric sender ID.max length 11
tostringrequired
Recipient in international format, no plus sign.
messagestringrequired
The text to send. Never stored in the request log.max length 918
callbackUrluri

Responses

202Message accepted for delivery.Fields

202 body

messageIdstring
statusstring
ACCEPTED
partsinteger
403The sender ID is not registered to you.Fields

403 body

errorstring
messagestring
requestIdstring

Sandbox scenarios

Delivereddefault

202 + callback

Handset switched offto = "254700000001"

202 + callback

Unregistered sender IDsenderId = "UNKNOWN"

403
curl -X POST 'https://devportal.softwaregroup.com/api/sandbox/messaging/v1/sms' \
  -H "Authorization: Bearer $LANGO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "senderId": "LANGO",
    "to": "254712345678",
    "message": "Your order 2041 has shipped.",
    "callbackUrl": "https://example.com/hooks/lango"
  }'
Try it in the sandboxno keys needed
POST/messaging/v1/sms
{
  "senderId": "LANGO",
  "to": "254712345678",
  "message": "Your order 2041 has shipped.",
  "callbackUrl": "https://example.com/hooks/lango"
}

Choose what happens

Check a message

GET/messaging/v1/sms/{messageId}

Path parameters

messageIdstringrequired

Responses

200Delivery state of the message.Fields

200 body

messageIdstring
statusstring
ACCEPTED · DELIVERED · UNDELIVERED
partsinteger
deliveredAtdate-time

Sandbox scenarios

Delivereddefault

200
curl -X GET 'https://devportal.softwaregroup.com/api/sandbox/messaging/v1/sms/msg_7k3p1w6t' \
  -H "Authorization: Bearer $LANGO_TOKEN"
Try it in the sandboxno keys needed
GET/messaging/v1/sms/msg_7k3p1w6t

Choose what happens