Developers

WhatsApp API documentation

Send WhatsApp messages from your own software with a simple REST API: one message or thousands, personalised, with files, scheduled, and with delivery webhooks.

Rs 2,500per month, flat

Flat monthly fee for access to the developer API: send single messages and bulk campaigns from your own software, with status webhooks. Messages go out from your linked WhatsApp number at the same safe pace.

Request API access

Getting started

  1. Create an account and link your WhatsApp number by QR code.
  2. Open Developer API in the menu and click Request API access (Rs 2,500 per month, flat).
  3. When an administrator approves it you get an email. Create an API key on the same page.
  4. 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

GET/accountYour WhatsApp status, today’s limit and queue
POST/messagesSend one message
GET/messages/{id}Status of one message
POST/campaignsSend one message to many people
GET/campaignsYour latest campaigns
GET/campaigns/{id}Progress of a campaign
GET/campaigns/{id}/messagesEvery message of a campaign (100 per page)
POST/campaigns/{id}/pausePause · also /resume and /cancel

Authentication

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"
  }'
FieldRequiredMeaning
toyesMobile number, best with country code
messageyes*Text, up to 4,096 characters (1,024 with a file). *Optional when a file is sent
name, fieldsnoValues for {name} and your own {placeholders}
scheduled_atnoSend later: ISO date or unix seconds, up to a year ahead. Empty = now
file, as_documentnoAn attachment, see Files
referencenoYour 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 statusMeaning
pendingWaiting in the queue (or for its scheduled time, sending hours, the daily limit)
sendingGoing out right now
sentWhatsApp accepted it
failedNot sent; error says why (for example, the number is not on WhatsApp). Not retried automatically
cancelledThe 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

HTTPerrorMeaning
401missing_key, invalid_keyNo key, a wrong key or a revoked key
403api_not_enabledAPI access is not approved (or was turned off) for the account
404not_foundNo such message, campaign or endpoint
409invalid_requestThe campaign cannot do that now (for example, resume one that is not paused)
413too_largeThe file is larger than 16 MB
422invalid_requestSomething in the request is wrong; message says what
429rate_limitedMore 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.

Request API accessSee all prices