Quick Start
Send your first message in less than 3 minutes.
Prerequisites
- Active Qlara account
- API Key (from the settings section of the platform)
1. Choose the channel
| Channel | When to use it |
|---|---|
| SMS | Reach any phone, including non-smartphones |
| RCS | Rich messages with buttons and images (Android) |
| Reach users on WhatsApp with approved templates |
2. Send your first SMS
- cURL
- Node.js
- Python
- PHP
- Java
curl -X POST "https://lora-api.agiletelecom.com/api/message-server/sms/send" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "+393401234567",
"sender": "MyCompany",
"body": "Ciao! Questo è il tuo primo SMS."
}'
const response = await fetch(
"https://lora-api.agiletelecom.com/api/message-server/sms/send",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
destination: "+393401234567",
sender: "MyCompany",
body: "Ciao! Questo è il tuo primo SMS.",
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://lora-api.agiletelecom.com/api/message-server/sms/send",
headers={
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"destination": "+393401234567",
"sender": "MyCompany",
"body": "Ciao! Questo è il tuo primo SMS.",
},
)
print(response.json())
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://lora-api.agiletelecom.com/api/message-server/sms/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"destination" => "+393401234567",
"sender" => "MyCompany",
"body" => "Ciao! Questo è il tuo primo SMS.",
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
HttpClient client = HttpClient.newHttpClient();
String jsonBody = """
{
"destination": "+393401234567",
"sender": "MyCompany",
"body": "Ciao! Questo è il tuo primo SMS."
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://lora-api.agiletelecom.com/api/message-server/sms/send"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
3. Send your first WhatsApp
- cURL
- Node.js
- Python
- PHP
- Java
curl -X POST "https://lora-api.agiletelecom.com/api/message-server/whatsapp/send" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "+393401234567",
"phoneNumberId": 5,
"template": { "id": 42 },
"enableNotification": true
}'
const response = await fetch(
"https://lora-api.agiletelecom.com/api/message-server/whatsapp/send",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
destination: "+393401234567",
phoneNumberId: 5,
template: { id: 42 },
enableNotification: true,
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://lora-api.agiletelecom.com/api/message-server/whatsapp/send",
headers={
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"destination": "+393401234567",
"phoneNumberId": 5,
"template": {"id": 42},
"enableNotification": True,
},
)
print(response.json())
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://lora-api.agiletelecom.com/api/message-server/whatsapp/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"destination" => "+393401234567",
"phoneNumberId" => 5,
"template" => ["id" => 42],
"enableNotification" => true,
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
HttpClient client = HttpClient.newHttpClient();
String jsonBody = """
{
"destination": "+393401234567",
"phoneNumberId": 5,
"template": { "id": 42 },
"enableNotification": true
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://lora-api.agiletelecom.com/api/message-server/whatsapp/send"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
4. Send your first RCS
- cURL
- Node.js
- Python
- PHP
- Java
curl -X POST "https://lora-api.agiletelecom.com/api/message-server/rcs/send" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "+393401234567",
"agentId": 10,
"templateId": 42
}'
const response = await fetch(
"https://lora-api.agiletelecom.com/api/message-server/rcs/send",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
destination: "+393401234567",
agentId: 10,
templateId: 42,
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://lora-api.agiletelecom.com/api/message-server/rcs/send",
headers={
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"destination": "+393401234567",
"agentId": 10,
"templateId": 42,
},
)
print(response.json())
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://lora-api.agiletelecom.com/api/message-server/rcs/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_API_KEY",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"destination" => "+393401234567",
"agentId" => 10,
"templateId" => 42,
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
HttpClient client = HttpClient.newHttpClient();
String jsonBody = """
{
"destination": "+393401234567",
"agentId": 10,
"templateId": 42
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://lora-api.agiletelecom.com/api/message-server/rcs/send"))
.header("X-Api-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
5. Verify the response
If everything went well, you will receive:
{
"messageId": "e76614d1-4ac1-4d94-89f0-d07f1b5a190c",
"simulation": false,
"results": {
"sms": { "accepted": true, "unicode": false, "parts": 1 }
}
}
caution
accepted: true means the message has been accepted for sending, not that it has been delivered. Delivery confirmation arrives via webhook (Delivery Notification).
Next steps
- Configure your callback URL to receive delivery notifications
- Explore templates for RCS and WhatsApp
- Configure automatic fallback to ensure delivery