Official WhatsApp numbers send campaigns as an approved Meta template: content {type: "template", template: {name, language, params, header?, buttons?}}. params fill {{1}}, {{2}}… of the template body in order and may use each recipient's {variables} (e.g. "{name|عميلنا}"); header fills a media header (link or mediaId) or a text header variable; buttons fill dynamic URL suffixes and copy codes. Other content types (text, media, location, contact, cta_url, buttons, list) answer 400 CLOUD_API_TEMPLATE_REQUIRED on an official number before anything is created. Recipients inline (≤10 000 with variables), contactListId or audience.
DescriptionYour unique id for this operation (≤ 191 visible ASCII). A retry with the same key and body returns the first answer with Idempotent-Replayed: true — it never runs twice. Kept 24 h.
X-Request-Idoptional
Typestring
Constraints—
DescriptionOptional: your own request id, echoed back (otherwise we generate req_…). Quote it to support.
Body
Name
Type
Constraints
Description
numberIdrequired
Typestring
Constraints—
DescriptionNumber to act on (id from GET /v2/numbers). A key restricted to some numbers can use only those.
namerequired
Typestring
Constraints≤ 120 chars
DescriptionCampaign name for your reports (≤ 120).
contentrequired
Typeobject
Constraints—
DescriptionWhat to send: an approved Meta template, { "type": "template", "template": { … } }. Other content types answer CLOUD_API_TEMPLATE_REQUIRED.
content.typerequired
Typestring
Constraintsone of: template
DescriptionAlways template.
content.templateoptional
Typeobject
Constraints—
DescriptionThe approved template to send to every recipient.
content.template.namerequired
Typestring
Constraints—
DescriptionTemplate name exactly as approved by Meta (e.g. order_shipped). Not approved yet → 409 TEMPLATE_NOT_APPROVED.
content.template.languagerequired
Typestring
Constraints—
DescriptionLanguage code of the approved template (e.g. ar, en_US).
content.template.paramsoptional
Typestring[]
Constraints≤ 20 items
DescriptionValues of {{1}}, {{2}}… in order (≤ 20); may use {name|fallback} and the other recipient variables.
content.template.headeroptional
Typeobject
Constraints—
DescriptionMedia header: {format: IMAGE | VIDEO | DOCUMENT, link (https) | mediaId, filename}; text header with {{1}}: {format: TEXT, text}.
content.template.buttonsoptional
Typeobject[]
Constraints≤ 10 items
DescriptionValues for the template’s dynamic buttons (≤ 10).
content.template.buttons[].indexoptional
Typeinteger
Constraints0–9
DescriptionButton position in the template, from 0.
content.template.buttons[].subTypeoptional
Typestring
Constraintsone of: url · copy_code
Descriptionurl (dynamic link suffix) or copy_code (code to copy).
content.template.buttons[].valueoptional
Typestring
Constraints≤ 2000 chars
DescriptionThe URL suffix or the code (≤ 2000).
recipientsoptional
Typeobject[]
Constraints≤ 10000 items
DescriptionInline audience (≤ 10 000). Or use contactListId / audience instead.
recipients[].phoneoptional
Typestring
Constraints—
DescriptionRecipient number, international digits. Invalid and opted-out numbers are skipped, never sent.
recipients[].variablesoptional
Typeobject
Constraints—
DescriptionValues for {placeholders} in the content, e.g. { "name": "Mona" }.
contactListIdoptional
Typestring
Constraints—
DescriptionSend to a saved contact list instead of inline recipients.
audienceoptional
Typeobject
Constraints—
DescriptionSelect contacts by lists and tags.
audience.listIdsoptional
Typearray
Constraints—
DescriptionContact list ids to include.
audience.tagsoptional
Typearray
Constraints—
DescriptionContacts with any of these tags.
audience.excludeTagsoptional
Typearray
Constraints—
DescriptionSkip contacts with any of these tags.
optInConfirmedrequired
Typeboolean
Constraintsmust be true
DescriptionMust be true: you confirm every recipient agreed to hear from you. Required for every campaign.
scheduleAtoptional
Typestring (date-time)
Constraints—
DescriptionStart later (ISO 8601).
startoptional
Typeboolean
Constraintsdefault true
Descriptionfalse creates a draft; start it later with POST /v2/campaigns/{id}/start. Drafts never started are deleted after 30 days.
speedoptional
Typeany
Constraints—
DescriptionIgnored (pacing was removed: Meta sets the messaging limits). Still accepted for one version; will be rejected later.
maxPerMinuteoptional
Typeany
Constraints—
DescriptionIgnored (pacing was removed). Still accepted for one version; will be rejected later.
maxPerHouroptional
Typeany
Constraints—
DescriptionIgnored (pacing was removed). Still accepted for one version; will be rejected later.
maxPerDayoptional
Typeany
Constraints—
DescriptionIgnored (pacing was removed). Still accepted for one version; will be rejected later.
400 · CLOUD_API_TEMPLATE_REQUIRED — Campaigns from an official number must use an approved Meta template.
Send content {type: "template", template: {name, language, params}}; buttons and media go inside the template.
Correct the cause before repeating the request.
HTTP 400 · application/json
{
"error": {
"code": "CLOUD_API_TEMPLATE_REQUIRED",
"message": "Campaigns from an official number must use an approved Meta template.",
"docsUrl": "https://mursilat.com/developers/v2/errors#CLOUD_API_TEMPLATE_REQUIRED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
409 · TEMPLATE_NOT_APPROVED — This template is not approved by Meta on this number (or the name / language is wrong).
Check name + language on the Templates page, sync templates, and wait for APPROVED (template.status).
Correct the cause before repeating the request.
HTTP 409 · application/json
{
"error": {
"code": "TEMPLATE_NOT_APPROVED",
"message": "This template is not approved by Meta on this number (or the name / language is wrong).",
"docsUrl": "https://mursilat.com/developers/v2/errors#TEMPLATE_NOT_APPROVED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
400 · TEMPLATE_PARAMS_MISMATCH — The number of template variables does not match the approved template. (Meta 132000; also as message.status failed)
Send exactly one value per {{n}} of the approved template.
Correct the cause before repeating the request.
HTTP 400 · application/json
{
"error": {
"code": "TEMPLATE_PARAMS_MISMATCH",
"message": "The number of template variables does not match the approved template. (Meta 132000; also as message.status failed)",
"docsUrl": "https://mursilat.com/developers/v2/errors#TEMPLATE_PARAMS_MISMATCH",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
403 · FEATURE_NOT_IN_PLAN — Your plan does not include this feature.
Upgrade (details.feature).
Correct the cause before repeating the request.
HTTP 403 · application/json
{
"error": {
"code": "FEATURE_NOT_IN_PLAN",
"message": "Your plan does not include this feature.",
"docsUrl": "https://mursilat.com/developers/v2/errors#FEATURE_NOT_IN_PLAN",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
409 · IDEMPOTENCY_KEY_REUSED — This Idempotency-Key was used with a different request.
Use a new key for a new request.
Correct the cause before repeating the request.
HTTP 409 · application/json
{
"error": {
"code": "IDEMPOTENCY_KEY_REUSED",
"message": "This Idempotency-Key was used with a different request.",
"docsUrl": "https://mursilat.com/developers/v2/errors#IDEMPOTENCY_KEY_REUSED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
409 · IDEMPOTENCY_IN_PROGRESS — The first request with this key is still running.
Retry in a few seconds.
Retry after addressing the cause.
HTTP 409 · application/json
{
"error": {
"code": "IDEMPOTENCY_IN_PROGRESS",
"message": "The first request with this key is still running.",
"docsUrl": "https://mursilat.com/developers/v2/errors#IDEMPOTENCY_IN_PROGRESS",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
403 · SCOPE_REQUIRED — The key lacks the scope of this endpoint.
Add the scope in details.required to the key.
Correct the cause before repeating the request.
HTTP 403 · application/json
{
"error": {
"code": "SCOPE_REQUIRED",
"message": "The key lacks the scope of this endpoint.",
"docsUrl": "https://mursilat.com/developers/v2/errors#SCOPE_REQUIRED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
Copy the key again from Settings → API keys (it is shown only once; create a new one if lost).
Correct the cause before repeating the request.
HTTP 401 · application/json
{
"error": {
"code": "API_KEY_INVALID",
"message": "The API key is not valid.",
"docsUrl": "https://mursilat.com/developers/v2/errors#API_KEY_INVALID",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
A new account's first campaign (and every campaign of an account held for review) starts in status pending_review: Mursilat reviews it before it is queued, and a campaign.status webhook tells you when it moves on. Pause / resume answer 400 CAMPAIGN_NOT_RUNNING / CAMPAIGN_NOT_PAUSED until then; cancel works.
recipients[].phone also accepts the user id (BSUID, e.g. "EG.4110857709215331") of a WhatsApp user who hid the phone behind a username — case-sensitive, sent as Meta’s recipient. In GET …/recipients such a recipient has phone: null and userId set.
The campaign skips invalid and opted-out numbers; the messaging limit Meta sets for the number applies to it too.
It pauses by itself on low delivery (< 80 % over the last hour), many opt-outs (> 3 per 100) or a WhatsApp rate limit — 1 hour, then 24 hours. You get campaign.status with the reason; platform pauses can’t be lifted early (CAMPAIGN_RESUME_BLOCKED).