Skip to main content

SMS Legacy API

What is SMS Legacy

SMS Legacy is the backward-compatible format for sending SMS messages through the Qlara platform. Unlike the Universal format (one message per request), the Legacy format allows you to send multiple messages to multiple recipients in a single HTTP request.

This format is designed for those who already have an existing integration based on this schema or for those who need to send the same message to recipient lists in a single call. For new integrations, the SMS Universal format is recommended.


Endpoint

Send messages

POST https://lora-api.agiletelecom.com/api/services/sms/send

Check credit

GET https://lora-api.agiletelecom.com/api/services/sms/credit

Content-Type: application/json

Authentication: API Key (X-Api-Key) or Basic Auth (Authorization: Basic)


Send request fields

Global fields

FieldTypeRequiredDefaultDescription
globalIdstringNo(auto)Global identifier for the request to group all messages sent in the same call. If not provided, it is automatically generated
enableConcatenatedbooleanNotrueIf true, long messages are automatically concatenated into multiple SMS parts. If false, the text is truncated to the maximum length of a single part
enableUnicodebooleanNotrueIf true, messages with non-GSM-7 characters are sent in Unicode encoding. If false, unsupported characters are removed or replaced
enableDeliverybooleanNotrueIf true, enables delivery notifications to your callback URL
simulationbooleanNofalseIf true, messages are processed and validated but not physically sent. Useful for testing
skipRcsOverridebooleanNofalseIf true, SMS messages are sent directly without going through any RCS override configured at the account level
messagesarrayYesList of messages to send. Each element describes a message with its recipients (see below)

messages[] object fields

Each element in the messages array represents a message with its text and the list of recipients.

FieldTypeRequiredDescription
destinationsarray[string]YesList of recipient numbers in international format (e.g., ["+393401234567", "+393409876543"])
idsarray[string]NoList of custom IDs for each recipient, in the same order as destinations. Useful for individual tracking
senderstringYesMessage sender. Alphanumeric (max 11 characters) or numeric
bodystringYes*Message text. *Mutually exclusive with hexBody
hexBodystringNo*Message text in hexadecimal format. Used for binary content. *Mutually exclusive with body
udhDatastringNoUser Data Header in hexadecimal format. Used for binary messages or manual concatenation
schedulingstringNoScheduled send date and time. Format: yyyy-MM-dd HH:mm:ss.SSSZ (e.g., 2025-10-01 09:00:00.000+0000)

Send response

{
"globalId": "d4f5e6a7-b8c9-0123-4567-890abcdef012",
"processedMessages": 1,
"processedSmsParts": 3,
"credit": 1247.50
}
FieldTypeDescription
globalIdstringGlobal request ID (the one provided or automatically generated)
processedMessagesintegerTotal number of messages processed (one message per recipient)
processedSmsPartsintegerTotal number of SMS parts generated (accounting for concatenation)
creditnumberRemaining credit after sending

Credit check endpoint

GET https://lora-api.agiletelecom.com/api/services/sms/credit

No body required. Returns the available credit balance for the account.

Response:

{
"credit": 1247.50
}
FieldTypeDescription
creditnumberAvailable SMS credit for your account

Comparison: Legacy vs Universal

FeatureSMS LegacySMS Universal
Messages per requestMultipleOne
Recipients per messageMultipleOne
Placeholders in textNoYes
Simulation modeYesYes
Scheduled sendYes (scheduling)Yes (scheduledDate)
Delivery notificationsYes (enableDelivery)Yes (enableNotification)
Custom message IDYes (ids[])Yes (messageId)
Unicode encoding controlYes (enableUnicode)Automatic
Concatenation controlYes (enableConcatenated)Automatic
Credit checkYes (dedicated endpoint)No
Recommended formatFor existing integrationsFor new integrations

Examples

1. Multi-recipient send

Sending the same message to three recipients with custom IDs for tracking:

{
"globalId": "campagna-marzo-2025",
"enableConcatenated": true,
"enableUnicode": true,
"enableDelivery": true,
"simulation": false,
"messages": [
{
"destinations": [
"+393401234567",
"+393409876543",
"+393405551234"
],
"ids": [
"msg-001",
"msg-002",
"msg-003"
],
"sender": "MyBrand",
"body": "Ciao! Approfitta della promozione: 20% di sconto su tutto il catalogo fino al 31 marzo. Visita il nostro sito!"
}
]
}

Response:

{
"globalId": "campagna-marzo-2025",
"processedMessages": 3,
"processedSmsParts": 3,
"credit": 1244.50
}

2. Credit check

To check the available SMS credit before a bulk send:

GET /api/services/sms/credit HTTP/1.1
Host: lora-api.agiletelecom.com
X-Api-Key: YOUR_API_KEY

Response:

{
"credit": 1244.50
}

Error codes

HTTP CodeMeaningWhat to do
200Request processedCheck processedMessages and processedSmsParts in the response
400Bad requestVerify required fields and data format
401Not authenticatedVerify your API Key or Basic Auth credentials
403Access deniedIP not in whitelist or unauthorized resource
422Unprocessable entityData is syntactically correct but semantically invalid
429Too many requestsYou have exceeded the rate limit. Retry after the indicated period
500Internal server errorRetry later. If the problem persists, contact support