WhatsApp Business API v2

Send templates, session text and media with the same API keys as SMS. Base URL: https://whitelabled.securesmsc.com/api/v2

Auth: Authorization: Bearer YOUR_API_KEY (or api_key). Manage keys in API Management. Each successful send uses 1 WhatsApp credit.
Meta 24-hour rule: free-form message and media_url only work when the recipient messaged you in the last 24 hours. Outside that window, send an approved template first.
POSThttps://whitelabled.securesmsc.com/api/v2/whatsapp/send

Send a template, session text, or media message.

ParameterTypeRequiredDescription
tostringYesRecipient with country code, e.g. 919876543210
templatestringOne of*Approved template name
paramsarrayNoOrdered values for {{1}}, {{2}}
languagestringNoTemplate language (defaults to template language)
messagestringOne of*Free-form text (open 24h session only)
media_urlstringOne of*Public https URL (open 24h session only)
media_typestringNoimage, video, document, audio
captionstringNoMedia caption

*Provide exactly one of template, message, or media_url.

cURL — template
curl -X POST "https://whitelabled.securesmsc.com/api/v2/whatsapp/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"919876543210","template":"smsc_biz_otp_v1","params":["482913"]}'
cURL — session text
curl -X POST "https://whitelabled.securesmsc.com/api/v2/whatsapp/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"919876543210","message":"Thanks — we are on it."}'
cURL — media
curl -X POST "https://whitelabled.securesmsc.com/api/v2/whatsapp/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"919876543210","media_url":"https://example.com/invoice.pdf","media_type":"document","caption":"Your invoice"}'
PHP
$ch = curl_init('https://whitelabled.securesmsc.com/api/v2/whatsapp/send');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'to' => '919876543210',
    'template' => 'smsc_biz_otp_v1',
    'params' => ['482913'],
  ]),
  CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);
Node.js
const res = await fetch('https://whitelabled.securesmsc.com/api/v2/whatsapp/send', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: '919876543210',
    template: 'smsc_biz_otp_v1',
    params: ['482913'],
  }),
});
console.log(await res.json());
Success
{
  "status": "success",
  "data": {
    "message_id": "wamid.HBgMOTE5...",
    "id": 51,
    "to": "919876543210"
  }
}
GEThttps://whitelabled.securesmsc.com/api/v2/whatsapp/templates

List approved templates for your connected WhatsApp Business account.

curl "https://whitelabled.securesmsc.com/api/v2/whatsapp/templates" \
  -H "Authorization: Bearer YOUR_API_KEY"

Each item includes name, category, language, body text, parameter count, and:

  • is_sendable — can be sent from the current sender
  • is_test_only — restricted to test numbers
  • send_disabled_reason — human-readable block reason when not sendable
GEThttps://whitelabled.securesmsc.com/api/v2/whatsapp/status/{messageId}

Delivery status by numeric id or Meta wamid. Typical path: sentdeliveredread, or failed.

curl "https://whitelabled.securesmsc.com/api/v2/whatsapp/status/51" \
  -H "Authorization: Bearer YOUR_API_KEY"

Error responses

HTTPCode / meaningWhat to do
401UnauthorizedCreate or rotate an API key
402Insufficient WhatsApp creditsTop up WhatsApp credits
403WhatsApp module disabledAsk your account manager to enable WhatsApp
404Template not found / not approvedCall GET /whatsapp/templates
409No WABA connectedFinish WhatsApp onboarding in the dashboard
422template_required24h window closed — send a template first
422template_not_sendableTemplate blocked for this sender
422invalid_recipientFix the to number format
502Upstream send failedRetry; check Meta / provider status

Try in Playground Back to API docs

How can we help?

Sales
Support
Billing
Technical
CAPTCHA
Type the 4 characters shown in the image