API Documentation

Integrate SMS messaging into your application with our REST API. Send single messages or batch campaigns with just a few lines of code.

Authentication

The API uses HTTP Basic Authentication with your API key and secret.

Basic Authentication

Use your API key and secret for server-to-server integrations.

Send your API key and secret as a Base64-encoded apiKey:apiSecret pair in the Authorization header.

Authorization: Basic base64(apiKey:apiSecret)

Example with a key my-api-key and secret my-api-secret:

Authorization: Basic bXktYXBpLWtleTpteS1hcGktc2VjcmV0

Generate API keys

Create and manage API keys from Settings > API Keys in your dashboard. Each key can be scoped to a specific project and organization.

Base URL

POST

Send SMS

Send a single SMS message to a phone number. Returns immediately with a message ID you can use to track delivery status.

Endpoint

POST /api/messages

Request body

FieldTypeRequiredDescription
channelstringYesSet to "Sms"
tostringYesRecipient phone number in E.164 format
bodystringYes*Message content (or use templateId)
fromstringNoSender ID or phone number
templateIdnumberNoUse a saved template instead of inline body
variablesobjectNoKey-value pairs for template variable substitution
prioritystringNoLow Normal Medium High

Example request

POST/api/messages
curl -X POST /api/messages \
  -u "YOUR_API_KEY:YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Sms",
  "to": "+1234567890",
  "body": "Hi Jane, your order #1042 has shipped!",
  "from": "+0987654321",
  "priority": "Normal"
}'

Example response

201 Created
{
  "id": 984301,
  "status": "Pending",
  "channel": "Sms",
  "to": "+1234567890"
}
POST

Send Batch SMS

Send SMS messages to multiple recipients in a single request. Supply recipients directly, reference contact lists or groups, or combine all three. Batches are processed asynchronously.

Endpoint

POST /api/messages/batch

Request body

FieldTypeRequiredDescription
channelstringYesSet to "Sms"
bodystringYes*Message content (or use templateId)
namestringNoA name to identify this batch campaign
recipientsstring[]No*Array of phone numbers in E.164 format
detailedRecipientsobject[]No*Recipients with per-recipient variables: { destination, variables }
listIdsnumber[]No*Send to contacts in these saved lists
groupIdsnumber[]No*Send to contacts in these groups
scheduledAtstringNoISO 8601 datetime to schedule delivery
prioritystringNoLow Normal Medium High
* At least one recipient source is required: recipients, detailedRecipients, listIds, or groupIds.

Example — simple batch

POST/api/messages/batch
curl -X POST /api/messages/batch \
  -u "YOUR_API_KEY:YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Sms",
  "name": "Order updates",
  "body": "Hi! Your order is on its way.",
  "recipients": [
    "+1234567890",
    "+0987654321",
    "+1122334455"
  ]
}'

Example — personalized batch with variables

POST/api/messages/batch
curl -X POST /api/messages/batch \
  -u "YOUR_API_KEY:YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Sms",
  "name": "Welcome campaign",
  "body": "Hi {{name}}, welcome to {{company}}!",
  "isParameterized": true,
  "detailedRecipients": [
    {
      "destination": "+1234567890",
      "variables": { "name": "Jane", "company": "Acme" }
    },
    {
      "destination": "+0987654321",
      "variables": { "name": "John", "company": "Globex" }
    }
  ]
}'

Example response

202 Accepted
{
  "id": 501220,
  "status": "Loading",
  "totalRecipients": 3
}

Message statuses

Track the lifecycle of each message through these statuses.

StatusDescription
PendingMessage received, awaiting processing
QueuedQueued for delivery to carrier
SentHanded off to the carrier network
DeliveredConfirmed delivered to the recipient
FailedDelivery failed (invalid number, carrier rejection, etc.)
RejectedRejected by policy or compliance rules

Ready to start sending?

Create a free account and send your first SMS in minutes. No credit card required.