Send a Text Message
POST /v1/notify/:channel/text
X-Api-Key: notifo_live_...
Content-Type: application/json
Request body
{
"to": "+905551234567",
"text": "Hello from Notifo!",
"channelAccountId": "acc_01j...",
"idempotencyKey": "order-123-notification"
}
| Field | Type | Required | Description |
|---|---|---|---|
to | string | yes | Recipient phone/chat ID |
text | string | yes | Message body (max 4096 chars) |
channelAccountId | UUID | no | Specific connected account to use; omit to use default |
idempotencyKey | string | no | Unique key (max 100 chars) to prevent duplicate sends |
Response 202 Accepted
{
"id": "msg_01j...",
"tenantId": "ten_01j...",
"provider": "whatsapp",
"to": "+905551234567",
"type": "text",
"status": "queued",
"body": { "text": "Hello from Notifo!" },
"createdAt": "2025-01-01T12:00:00.000Z"
}
Examples
- cURL
- Node.js
- Python
- PHP
curl -X POST https://api.notifo.cloud/v1/notify/whatsapp/text \
-H "X-Api-Key: notifo_live_abc123" \
-H "Content-Type: application/json" \
-d '{"to": "+905551234567", "text": "Hello!"}'
const res = await fetch('https://api.notifo.cloud/v1/notify/whatsapp/text', {
method: 'POST',
headers: {
'X-Api-Key': 'notifo_live_abc123',
'Content-Type': 'application/json',
},
body: JSON.stringify({ to: '+905551234567', text: 'Hello!' }),
});
const message = await res.json();
import httpx
r = httpx.post(
'https://api.notifo.cloud/v1/notify/whatsapp/text',
headers={'X-Api-Key': 'notifo_live_abc123'},
json={'to': '+905551234567', 'text': 'Hello!'},
)
message = r.json()
$ch = curl_init('https://api.notifo.cloud/v1/notify/whatsapp/text');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['X-Api-Key: notifo_live_abc123', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['to' => '+905551234567', 'text' => 'Hello!']),
CURLOPT_RETURNTRANSFER => true,
]);
$message = json_decode(curl_exec($ch), true);