Overview
https://app.sendly.ge/api/v1Authorization: Bearer wa_live_…application/jsonGet your credentials
A connected WhatsApp Business Account and an API key are both needed before you can send.
| What | Where it comes from | Purpose |
|---|---|---|
wa_live_… API key |
Dashboard → WhatsApp → API Keys, or POST /api/v1/whatsapp/keys |
Authenticates your requests. Shown once at creation — store it securely. |
| WhatsApp Business Account | Connected from the WhatsApp settings page | Messages send from your account’s phone number. Name one explicitly with phoneNumberId if you have more than one. |
To revoke a key, delete it on the API Keys page or call DELETE /api/v1/whatsapp/keys/:id; requests using it immediately return 401.
Send a message
/api/v1/whatsapp/messages
One endpoint handles both template and free-form sends. It answers 202 Accepted with the queued message id; delivery happens in the background.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
type | string | ✅ | template or text. See the 24-hour rule below. |
to | string | ✅ | Recipient in international format, e.g. 995555123456. |
text | string | for text | Message body. Only allowed inside the 24-hour window. |
templateName | string | for template | Name of a template Meta has approved. |
templateLanguage | string | for template | Must match the approved language exactly, e.g. en_US. |
components | array | optional | Template variables. The number of body parameters must match the template. |
phoneNumberId | string | optional | Send from a specific number. Omit if your account has one. |
Response — 202 Accepted
{
"id": "clx9a8b7c6d5e4f3g2h1",
"status": "QUEUED"
}
The id correlates to a row in the dashboard inbox, where you can watch the status transition.
The 24-hour rule
This is WhatsApp’s rule, not Sendly’s, and it decides which of the two send types you may use.
| Situation | What you may send |
|---|---|
| The person has not messaged you in the last 24 hours | An approved template only (type: "template") |
| Within 24 hours of their last message | Free-form text (type: "text") or a template |
curl -X POST https://app.sendly.ge/api/v1/whatsapp/messages \
-H "Authorization: Bearer wa_live_xxxx..." \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"to": "995555123456",
"text": "See you at 15:00."
}'
Examples
Appointment reminder (curl)
curl -X POST https://app.sendly.ge/api/v1/whatsapp/messages \
-H "Authorization: Bearer wa_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"type": "template",
"to": "995555123456",
"templateName": "confirmation",
"templateLanguage": "en_US",
"components": [
{ "type": "body", "parameters": [{ "type": "text", "text": "Nino" }] }
]
}'
Node.js
const res = await fetch("https://app.sendly.ge/api/v1/whatsapp/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDLY_WA_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "template",
to: "995555123456",
templateName: "confirmation",
templateLanguage: "en_US",
components: [
{ type: "body", parameters: [{ type: "text", text: "Nino" }] },
],
}),
});
if (!res.ok) {
throw new Error(`WhatsApp send failed: ${res.status} ${await res.text()}`);
}
const { id, status } = await res.json();
console.log(`Queued ${id} (${status})`);
Errors
| Status | Meaning |
|---|---|
401 | Missing, malformed or revoked API key. |
400 | Invalid body — commonly a template name or language that does not match an approved template, or the wrong number of body variables. |
403 | Free-form text attempted outside the 24-hour window. Send a template instead. |
404 | No active WhatsApp number, or a phoneNumberId that does not belong to your organization. |
429 | Above your number’s WhatsApp messaging tier. Retry with backoff. |
A 202 followed by a FAILED message usually means Meta rejected the send. The reason is on the message record — most often a template that is not approved, or a language mismatch.
Data retention
Conversations and sent messages are kept for the life of your account and stay visible in the inbox.
Scheduled booking reminders are the exception: finished reminders are kept for 14 days and then removed automatically. See the Alteg.io integration guide for exactly what that covers.