Skip to main content

WhatsApp campaign without a template (JSON API)

One request creates a whole WhatsApp campaign: one text to a list of phone numbers, without a template and without a sender of your own. Before sending, every number is checked for WhatsApp, and the text goes only to numbers where WhatsApp is registered. The campaign appears in your cabinet next to the others.

Conditions
  • At least 2000 phone numbers in a request, at most 100 000.
  • Text only, up to 1000 characters: no images, buttons, list substitutions ({1}) or short links. WhatsApp formatting works: *bold*, _italic_, ~strikethrough~, `monospace`.
  • One text for the whole campaign — one request is one campaign.
  • The service is enabled by your manager. A client works either with this channel or with the template channel, not both.

Price. Each number costs the check (your HLR price for the number's country) plus the sending (your WhatsApp price). The full amount is charged when the campaign is created; what was not spent is returned when the result is known:

  • no WhatsApp on the number — the sending price is returned, the check stays charged;
  • fewer than 1000 numbers have WhatsApp — the campaign is still sent, but the sending is charged as for 1000 numbers;
  • the campaign was not sent — the sending price is returned to every number.

Result. The response carries msg_id for every number. The final status comes later — usually within a day — with the message status request or in the webhook:

StatusMeaning
QUEUED, ACCEPTEDthe check or the sending is in progress
DELIVEREDWhatsApp is on the number and the message was sent
UNDELIVERABLEthere is no WhatsApp on the number, nothing was sent
UNKNOWNthe campaign could not be sent; the sending price is returned
URI: https://alphasms.net/api/json.php

All requests to API are sent in JSON format using the POST method.

Header parameters​

Requests must contain header Content-Type: application/json, otherwise, the request will be considered invalid even if it has valid JSON.

Request example​

{
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "campaign/create",
"channel": "whatsapp",
"text": "*Black Friday*: 20% off everything until Sunday.",
"phones": [
447700900123,
447700900124,
447700900125
],
"name": "Black Friday",
"hook": "https://example.org/webhook/url.php",
"id": "bf-2026"
}
]
}

Response examples​

HTTP Status Code: 200
Content Type: JSON application/json

{
"success": true,
"data": [
{
"success": true,
"data": {
"campaign_id": 1204512,
"channel": "whatsapp",
"amount": 1050.5,
"messages": [
{ "msg_id": 23468710, "phone": 447700900123 },
{ "msg_id": 23468711, "phone": 447700900124 },
{ "msg_id": 23468712, "phone": 447700900125 }
],
"id": "bf-2026"
}
}
]
}