Documentation ›
Messages › Send SMS
POST
Send SMS
POSThttps://app.sendapp.ai/api/sms/send
Send an SMS via the SMS Gateway. The gateway must be configured and a device must be linked before using this API.
The SMS Gateway must be configured and a device linked in Apps > SMS Gateway before using this endpoint.
Parameters
apikey
required
Your API Key.
token
required
Account token.
number
required
Recipient number in international format (e.g. +39XXXXXXXXXX).
message
required
The text of the message to send.
Request
curl -X POST 'https://app.sendapp.ai/api/sms/send' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "YOUR_API_KEY",
"token": "YOUR_ACCOUNT_TOKEN",
"number": "+39XXXXXXXXXX",
"message": "Hello from SendApp!"
}'<?php
$ch = curl_init('https://app.sendapp.ai/api/sms/send');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'apikey' => 'YOUR_API_KEY',
'token' => 'YOUR_ACCOUNT_TOKEN',
'number' => '+39XXXXXXXXXX',
'message' => 'Hello from SendApp!',
]),
]);
echo curl_exec($ch);
curl_close($ch);const res = await fetch('https://app.sendapp.ai/api/sms/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apikey: 'YOUR_API_KEY',
token: 'YOUR_ACCOUNT_TOKEN',
number: '+39XXXXXXXXXX',
message: 'Hello from SendApp!'
})
});
console.log(await res.json());Response (200 OK)
{
"status": "success",
"message": "SMS sent successfully"
}Error
{
"status": "error",
"message": "No active SMS Gateway instance found. Please configure SMS Gateway first."
}