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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
globalId | string | No | (auto) | Global identifier for the request to group all messages sent in the same call. If not provided, it is automatically generated |
enableConcatenated | boolean | No | true | If true, long messages are automatically concatenated into multiple SMS parts. If false, the text is truncated to the maximum length of a single part |
enableUnicode | boolean | No | true | If true, messages with non-GSM-7 characters are sent in Unicode encoding. If false, unsupported characters are removed or replaced |
enableDelivery | boolean | No | true | If true, enables delivery notifications to your callback URL |
simulation | boolean | No | false | If true, messages are processed and validated but not physically sent. Useful for testing |
skipRcsOverride | boolean | No | false | If true, SMS messages are sent directly without going through any RCS override configured at the account level |
messages | array | Yes | – | List 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.
| Field | Type | Required | Description |
|---|---|---|---|
destinations | array[string] | Yes | List of recipient numbers in international format (e.g., ["+393401234567", "+393409876543"]) |
ids | array[string] | No | List of custom IDs for each recipient, in the same order as destinations. Useful for individual tracking |
sender | string | Yes | Message sender. Alphanumeric (max 11 characters) or numeric |
body | string | Yes* | Message text. *Mutually exclusive with hexBody |
hexBody | string | No* | Message text in hexadecimal format. Used for binary content. *Mutually exclusive with body |
udhData | string | No | User Data Header in hexadecimal format. Used for binary messages or manual concatenation |
scheduling | string | No | Scheduled 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
}
| Field | Type | Description |
|---|---|---|
globalId | string | Global request ID (the one provided or automatically generated) |
processedMessages | integer | Total number of messages processed (one message per recipient) |
processedSmsParts | integer | Total number of SMS parts generated (accounting for concatenation) |
credit | number | Remaining 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
}
| Field | Type | Description |
|---|---|---|
credit | number | Available SMS credit for your account |
Comparison: Legacy vs Universal
| Feature | SMS Legacy | SMS Universal |
|---|---|---|
| Messages per request | Multiple | One |
| Recipients per message | Multiple | One |
| Placeholders in text | No | Yes |
| Simulation mode | Yes | Yes |
| Scheduled send | Yes (scheduling) | Yes (scheduledDate) |
| Delivery notifications | Yes (enableDelivery) | Yes (enableNotification) |
| Custom message ID | Yes (ids[]) | Yes (messageId) |
| Unicode encoding control | Yes (enableUnicode) | Automatic |
| Concatenation control | Yes (enableConcatenated) | Automatic |
| Credit check | Yes (dedicated endpoint) | No |
| Recommended format | For existing integrations | For 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 Code | Meaning | What to do |
|---|---|---|
200 | Request processed | Check processedMessages and processedSmsParts in the response |
400 | Bad request | Verify required fields and data format |
401 | Not authenticated | Verify your API Key or Basic Auth credentials |
403 | Access denied | IP not in whitelist or unauthorized resource |
422 | Unprocessable entity | Data is syntactically correct but semantically invalid |
429 | Too many requests | You have exceeded the rate limit. Retry after the indicated period |
500 | Internal server error | Retry later. If the problem persists, contact support |