Getting started
- Create an account and link your WhatsApp number by QR code.
- Open Developer API in the menu and click Request API access (Rs 2,500 per month, flat).
- When an administrator approves it you get an email. Create an API key on the same page.
- Call the API from your server. Base address:
https://santo.com.np/api/v1
All requests and responses are JSON (UTF-8). Every response has "ok": true or "ok": false with an error code and a readable message. Times are ISO 8601 (UTC) in responses; you may send ISO dates or unix seconds.
Endpoints
/accountYour WhatsApp status, today’s limit and queue/messagesSend one message/messages/{id}Status of one message/campaignsSend one message to many people/campaignsYour latest campaigns/campaigns/{id}Progress of a campaign/campaigns/{id}/messagesEvery message of a campaign (100 per page)/campaigns/{id}/pausePause · also /resume and /cancelAuthentication
Send your key in the Authorization header of every request. Keys start with sbm_live_.
Authorization: Bearer sbm_live_xxxxxxxxxxxxxxxxxxxxxxxx
Keep keys on your server. Anyone with a key can send messages from your number. Never put one in a web page or a phone app. If a key leaks, revoke it on the Developer API page; it stops working at once.
curl https://santo.com.np/api/v1/account -H "Authorization: Bearer YOUR_API_KEY"
Send a message
POST /messages. Use {name} and your own fields in the text; {Hi|Hello} picks one at random. Numbers without a country code get +977.
curl -X POST https://santo.com.np/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+9779801234567",
"name": "Ram Traders",
"message": "Namaste {name}, your invoice {invoice} of {amount} is ready.",
"fields": { "invoice": "INV-1042", "amount": "Rs 12,500" },
"scheduled_at": "2026-12-01T09:00:00+05:45"
}'
| Field | Required | Meaning |
|---|---|---|
to | yes | Mobile number, best with country code |
message | yes* | Text, up to 4,096 characters (1,024 with a file). *Optional when a file is sent |
name, fields | no | Values for {name} and your own {placeholders} |
scheduled_at | no | Send later: ISO date or unix seconds, up to a year ahead. Empty = now |
file, as_document | no | An attachment, see Files |
reference | no | Your own label, shown as the campaign name |
Response 201:
{
"ok": true,
"message": { "id": 5821, "campaign_id": 912, "to": "+9779801234567", "name": "Ram Traders",
"status": "pending", "error": null, "sent_at": null, "scheduled_at": null },
"estimated_send_in_seconds": 45
}
Send a campaign
POST /campaigns: one message, personalised for up to 10,000 recipients. Any extra key on a recipient becomes a placeholder. Repeated numbers are sent once.
curl -X POST https://santo.com.np/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Tihar offer",
"message": "{Namaste|Hello} {name}! Our Tihar offer for {city}: 20% off until Friday.",
"recipients": [
{ "phone": "+9779801234567", "name": "Ram Traders", "city": "Kathmandu" },
{ "phone": "9812345678", "name": "Sita Stores", "city": "Pokhara" }
]
}'
{
"ok": true,
"campaign": { "id": 913, "name": "Tihar offer", "status": "sending", "source": "api",
"counts": { "total": 2, "sent": 0, "failed": 0, "pending": 2, "cancelled": 0 } },
"queued": 2, "duplicates_skipped": 0, "invalid_numbers": [],
"message_ids": [5822, 5823], "estimated_finish_in_seconds": 140
}
Files
Attach one file per request, up to 16 MB. The message becomes its caption. JPG/PNG photos and MP4 video show inline; PDF, Word, Excel, PowerPoint, ZIP and audio arrive as files. Set "as_document": true to send a photo as a file in full quality.
Multipart (easiest from PHP and cURL). Send recipients as a JSON string:
curl -X POST https://santo.com.np/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-F to=+9779801234567 -F "message=Your bill is attached." \
-F file=@bill-1042.pdf
JSON with base64:
{ "to": "+9779801234567", "message": "Your bill is attached.",
"file": { "name": "bill-1042.pdf", "data": "JVBERi0xLjQKJ..." } }
Statuses
| Message status | Meaning |
|---|---|
pending | Waiting in the queue (or for its scheduled time, sending hours, the daily limit) |
sending | Going out right now |
sent | WhatsApp accepted it |
failed | Not sent; error says why (for example, the number is not on WhatsApp). Not retried automatically |
cancelled | The campaign was cancelled before this one went out |
A campaign is scheduled, sending, paused, done or cancelled. Campaigns pause by themselves when too many numbers fail, to protect your WhatsApp number.
curl https://santo.com.np/api/v1/messages/5821 -H "Authorization: Bearer YOUR_API_KEY"
Webhooks
Set a webhook address on the Developer API page. When a message is sent or fails, we POST to it:
POST https://your-app.com/whatsapp/webhook
Content-Type: application/json
X-SBM-Event: message.sent
X-SBM-Signature: sha256=5f2b...
{ "event": "message.sent", "sent_at": "2026-12-01T03:15:42.000Z",
"message": { "id": 5821, "campaign_id": 912, "to": "+9779801234567", "name": "Ram Traders",
"status": "sent", "error": null } }
Answer with any 2xx status within 10 seconds. A failed delivery is tried once more after 30 seconds. Check the signature with your signing secret:
// PHP
$body = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $body, 'whsec_your_secret');
if (!hash_equals($expected, $_SERVER['HTTP_X_SBM_SIGNATURE'] ?? '')) { http_response_code(401); exit; }
$event = json_decode($body, true);
// Node.js (Express, with express.raw({ type: 'application/json' }))
const crypto = require('crypto');
const expected = 'sha256=' + crypto.createHmac('sha256', 'whsec_your_secret').update(req.body).digest('hex');
const valid = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(req.get('X-SBM-Signature') || ''));
Errors & limits
| HTTP | error | Meaning |
|---|---|---|
| 401 | missing_key, invalid_key | No key, a wrong key or a revoked key |
| 403 | api_not_enabled | API access is not approved (or was turned off) for the account |
| 404 | not_found | No such message, campaign or endpoint |
| 409 | invalid_request | The campaign cannot do that now (for example, resume one that is not paused) |
| 413 | too_large | The file is larger than 16 MB |
| 422 | invalid_request | Something in the request is wrong; message says what |
| 429 | rate_limited | More than 120 requests a minute with one key. Wait for Retry-After |
Sending pace. The API accepts messages at once, but they are sent at a safe pace: about 51 an hour per number by default, up to the account’s daily limit, during sending hours (8:00–20:00, Asia/Katmandu). GET /account shows the current limits and why the queue is waiting, if it is.
API questions
Does SANTO BULK MESSAGING have a WhatsApp API?
Yes. The SANTO BULK MESSAGING REST API lets your own website, ERP, CRM or app send WhatsApp messages, single or in bulk, with personalisation, attachments and scheduling, and report delivery by status checks or webhooks. API access costs Rs 2,500 per month, flat.
How do I get an API key?
Create an account, open Developer API in the menu and request access. After an administrator approves it, create a key on the same page. Each key is shown once; keep it on your server.
How fast does the API send messages?
Messages join the same queue as the website and go out one at a time with human-like pacing (about 51 an hour per number by default), within the daily limit and sending hours. This protects the WhatsApp number from being flagged.
Can I send PDFs and images through the API?
Yes. Upload the file as multipart form data (field "file"), or send it as base64 in JSON. Up to 16 MB: images and MP4 video show inline with the caption, other files arrive as documents.
How do I know a message was delivered?
Either check GET /api/v1/messages/{id}, or set a webhook: we POST message.sent or message.failed to your address, signed with HMAC-SHA256.
Is this the official WhatsApp Business API?
No. It sends through the WhatsApp number you link by QR code. The official WhatsApp Cloud API from Meta is planned; see the Cloud API guide.