number key ok— Also accepts the legacy per-number x-api-key, for its own number.
sends messages
Types: text, image, video, audio, voice, document, sticker, location, contact, buttons, list, cta_url and template. Meta’s 24-hour rule applies: free-form types reach only a customer who wrote to the number in the last 24 hours (else 409 CLOUD_API_WINDOW_CLOSED); type "template" sends an approved template at any time — see Send a template. Scheduling (scheduleAt) is available on request — see Schedule a message.
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.
torequired
Typestring
Constraints—
DescriptionRecipient: international digits without + or leading zeros (e.g. 201001234567, 966501234567).
typerequired
Typestring
Constraints—
DescriptionMessage type: text, image, video, audio, voice, document, sticker, location, contact, buttons, list, cta_url. Each type has its own fields — see the table below.
textoptional
Typestring
Constraints—
DescriptionMessage text. WhatsApp formatting passes through (*bold*, _italic_, ~strike~).
referenceoptional
Typestring
Constraints≤ 128 chars
DescriptionYour own id (order number, ticket…). Echoed in message.status / interactive.reply webhooks and filterable in GET /v2/messages.
scheduleAtoptional
Typestring (date-time)
Constraints—
DescriptionISO 8601 time 1 minute – 30 days ahead. Available on request (otherwise 422 SCHEDULING_DISABLED).
403 · MESSAGES_QUOTA_EXCEEDED — No messages left in your plan.
Buy a message pack or upgrade.
Correct the cause before repeating the request.
HTTP 403 · application/json
{
"error": {
"code": "MESSAGES_QUOTA_EXCEEDED",
"message": "No messages left in your plan.",
"docsUrl": "https://mursilat.com/developers/v2/errors#MESSAGES_QUOTA_EXCEEDED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
409 · CLOUD_API_WINDOW_CLOSED — The customer has not written in the last 24 hours: only an approved template can be sent.
Send type "template", or wait until the customer writes to you.
Correct the cause before repeating the request.
HTTP 409 · application/json
{
"error": {
"code": "CLOUD_API_WINDOW_CLOSED",
"message": "The customer has not written in the last 24 hours: only an approved template can be sent.",
"docsUrl": "https://mursilat.com/developers/v2/errors#CLOUD_API_WINDOW_CLOSED",
"requestId": "req_6604bedc8c489f20e582691a"
}
}
400 · CLOUD_API_UNSUPPORTED — This message type is not available on official numbers.
Use text, media, location, contact, buttons, list, cta_url or template.
Correct the cause before repeating the request.
HTTP 400 · application/json
{
"error": {
"code": "CLOUD_API_UNSUPPORTED",
"message": "This message type is not available on official numbers.",
"docsUrl": "https://mursilat.com/developers/v2/errors#CLOUD_API_UNSUPPORTED",
"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"
}
}
Recipients: "to" is the phone with country code, or — for a WhatsApp user who turned on a username and hid the phone — the user id Meta sends instead (BSUID, e.g. "EG.4110857709215331"; it comes in message.received webhooks). A BSUID is case-sensitive: send it exactly as received. Opt-outs are checked under both the phone and the BSUID of the same person.
Under load the answer is still 200 with status "queued" and estimatedDelayMs.
24-hour rule: the window opens (or re-opens) each time the customer writes to the number and closes 24 hours later. Outside it, only type "template" is accepted. Your own replies do not re-open it.
Interactive limits (Meta): buttons ≤ 3 (title ≤ 20 chars); list ≤ 10 rows in ≤ 10 sections (row title ≤ 24, description ≤ 72, button ≤ 20); cta_url title ≤ 20 and an https link; body ≤ 1024, header / footer ≤ 60. A message over these limits is sent as numbered plain text so the customer can still answer.
Media limits: image ≤ 5 MB (JPEG / PNG / WebP), video ≤ 16 MB (MP4 / 3GP), audio and voice ≤ 16 MB, document ≤ 100 MB, sticker WebP 512×512 (≤ 100 kB static, ≤ 500 kB animated; other images are converted). Polls, events and live location cannot be sent from official numbers.
Meta’s rules: outside the 24-hour customer-service window only Meta-approved templates can be sent, and Meta sets each number’s messaging limit and quality rating.
Refused: opted-out recipients (422 SAFETY_SUPPRESSED), blocked content such as URL shorteners (422 SAFETY_CONTENT_BLOCKED), a number paused by Mursilat (423 SAFETY_NUMBER_PAUSED) or banned (403 SAFETY_NUMBER_BANNED). Don’t retry these unchanged.