Skip to content

WizMessage API documentation

Send WhatsApp messages from your own software and receive replies by webhook: keys, signed requests, every call, limits, error codes and code examples.

Your own software can send WhatsApp messages from a number that is connected to WizMessage, and hear about replies, deliveries and failures by webhook. The API speaks JSON over https. Every path on these pages starts with https://wizmessage.com/api/v1/external.

Before you start

  • A WhatsApp Business number connected to WizMessage. A number can stay in the WhatsApp Business app on your phone at the same time, see coexistence.
  • An active Wiz Bot or Wiz Pro plan. After a plan ends, the API keeps working for 7 days. See prices.
  • An API key and its secret. The owner of the account makes them under API Management with Connect your software; both are shown once. The manual shows each screen.
  • A server. The key and the secret belong there, never in a web page, a mobile app or a repository.

Send your first message

Put the key and the secret into the environment as WIZMESSAGE_API_KEY and WIZMESSAGE_API_SECRET. Write a WhatsApp message to your business from your own phone, then run one of these with your phone's number. +447700900123 is made up.

quickstart.sh
# bash quickstart.sh +447700900123 (needs curl and openssl)
BODY='{"to":"'"$1"'","message":"Your parcel is ready to collect.","reference":"order-1042"}'
TIMESTAMP=$(date +%s)
KEY=$(printf '%s' "$WIZMESSAGE_API_SECRET" | openssl dgst -sha256 -r | cut -d' ' -f1)
SIGNATURE=$(printf '%s' "$TIMESTAMP.$BODY" | openssl dgst -sha256 -hmac "$KEY" -r | cut -d' ' -f1)

curl -sS --max-time 70 -X POST https://wizmessage.com/api/v1/external/messages/text \
  -H "X-API-Key: $WIZMESSAGE_API_KEY" \
  -H "X-Timestamp: $TIMESTAMP" \
  -H "X-API-Signature: $SIGNATURE" \
  -H 'Content-Type: application/json' \
  --data-binary "$BODY"

A free text arrives only within 24 hours of the last message from that person. After that, send an approved template.

Answer
{
  "success": true,
  "data": {
    "message_id": "0b9d7c1e-2f4a-4c55-9a5e-6a1f0c2d3e4f",
    "whatsapp_message_id": "wamid.EXAMPLE-SENT-1",
    "status": "sent"
  },
  "meta": {
    "request_id": "b1e6a2c4-1111-4222-8333-944455566677",
    "rate_limit": {
      "limit": 60,
      "remaining": 59,
      "reset_at": "2026-11-25T10:01:00.000Z"
    }
  }
}

There are two ids in it. message_id is ours: look the message up with it. whatsapp_message_id is the one that webhooks carry later as data.message_id. sent means that WhatsApp accepted the message; a webhook tells you when it was delivered, read or refused.

Where to read on

PageWhat you find there
AuthenticationMake a key, choose its permissions, sign a request, a small client in four languages
Send messagesText, files, reply buttons, lists, contact cards, reactions, delivery status
Send templatesStart or reopen a conversation with an approved template and your own variable names
WebhooksReceive messages and delivery reports, verify them, download files from customers

All calls

CallWhat it doesPermission
POST /messages/textSend a text messagesend_text
POST /messages/mediaSend a document, image, video or audio filesend_media
POST /messages/template/sendSend an approved templatesend_template
POST /messages/templateSend an approved template with raw componentssend_template
POST /messages/interactive/listSend a list to choose fromsend_text
POST /messages/interactive/buttonSend up to three reply buttonssend_text
POST /messages/contactsSend contact cardssend_text
POST /messages/reactionReact to a message with an emojisend_text
GET /messages/{uuid}Look up a messageany key
POST /media/uploadUpload a fileany key
GET /media/{media_id}Download a fileview_messages
GET /templatesList templatesview_templates
GET /templates/{name}Read one templateview_templates

Limits

LimitValueNote
Requests a minute60Per key; the owner can raise it to 1,000.
Requests a day1,000Per key, every call counts; the owner can raise it to 100,000.
Messages to one number a minute10Per key and recipient.
Speed of one WhatsApp numberabout 15 a secondShared with campaigns and the inbox. A call waits up to 30 seconds for its turn.
Client timeoutat least 65 secondsThere is no idempotency key: do not send again blindly after a timeout.
Document100 MBImage 5 MB, video 16 MB, audio 16 MB. Downloads 32 MB.

The answer of a send carries meta.rate_limit with what is left of the minute.

Errors

An error has the same outline on every call. details is there when there is more to say. Quote meta.request_id when you write to us.

Error
{
  "success": false,
  "error": {
    "code": "E_VALIDATION_ERROR",
    "message": "Validation failure: to: The to field format is invalid",
    "details": {
      "to": [
        "The to field format is invalid"
      ]
    }
  },
  "meta": {
    "request_id": "b1e6a2c4-1111-4222-8333-944455566677"
  }
}
  • 400, 401, 403, 404, 413 and 422: something has to change first. The same call again gets the same answer.
  • 429: wait, then try again. A code with LIMIT is ours; MESSAGE_SEND_FAILED with 429 means that WhatsApp slows the number down.
  • 500 and 502, or no answer at all: a message may be out already. Wait for the webhook with your reference before you send it again.
StatusCodeMeaning
422E_VALIDATION_ERRORA field is missing or wrong. details names each field.
422VALIDATION_ERRORThe fields do not fit together, for example a caption on audio.
401INVALID_API_KEYThe key is missing or unknown.
401INVALID_SIGNATUREThe signature does not fit the body, or is missing on a key that needs it.
401TIMESTAMP_EXPIREDThe timestamp is more than 5 minutes off.
401EXPIRED_API_KEYThe key has passed its end date.
401REVOKED_API_KEYThe key was revoked.
401SUSPENDED_API_KEYThe key is switched off.
403IP_NOT_ALLOWEDThe key has an address list and this address is not on it.
403PERMISSION_DENIEDThe key lacks this permission. AI agent keys are always refused here.
403SUBSCRIPTION_REQUIREDNo active Wiz Bot or Wiz Pro plan, and the 7 days of grace are over.
403ACCOUNT_NOT_ACTIVEThe WhatsApp number of the key is not active.
429RATE_LIMIT_EXCEEDEDToo many requests this minute. details.retry_after says how many seconds to wait.
429DAILY_LIMIT_EXCEEDEDThe daily limit of the key is used up.
422MESSAGE_SEND_FAILEDWhatsApp refused the message. With 429, WhatsApp slows the number down; with 500, something unexpected failed.
404MESSAGE_NOT_FOUNDNo such message for this key.
404TEMPLATE_NOT_FOUNDNo such template.
400TEMPLATE_NOT_CONFIGUREDThe template is not set up for this key in API Management.
400INVALID_TEMPLATE_PARAMSA variable of the template is missing or wrong.
400INVALID_DATE_FORMATA date variable is not a date.
400NO_FILE_PROVIDEDThe upload has no file.
400INVALID_FILEThe file is too large or of a kind that is not allowed.
400UNSUPPORTED_FILE_TYPEThe kind of file could not be recognised.
400FILE_TOO_LARGELarger than allowed for this kind of file.
400INVALID_MIME_TYPEThe file does not fit the given media_type.
500UPLOAD_FAILEDThe upload to WhatsApp failed.
500NO_MEDIA_IDWhatsApp returned no media id.
400INVALID_MEDIA_IDNot a media id.
404MEDIA_NOT_FOUNDUnknown, expired, or not of this account.
413MEDIA_TOO_LARGELarger than 32 MB.
502MEDIA_DOWNLOAD_FAILEDThe file could not be fetched from WhatsApp. Worth another try.
404COEXT_ACCOUNT_NOT_FOUNDThe WhatsApp account of the key is gone.
400COEXT_ACCOUNT_NOT_CONFIGUREDThe WhatsApp account of the key is not ready.
400PHONE_NUMBER_ID_MISSINGThe WhatsApp account of the key has no number.
400BUSINESS_TOKEN_MISSINGThe WhatsApp account of the key must be connected again.
500INTERNAL_ERRORSomething unexpected failed.

What the API does not do

  • It does not check the 24-hour window, and it does not check whether a customer unsubscribed. Your software has to know both.
  • It has no idempotency key. Two equal calls send two messages. Give every send a reference of your own, and compare it with the message.sent webhook before you repeat anything.
  • It does not show its messages in the WizMessage inbox at the moment. Answers of customers do appear there.
  • It cannot take a reaction back at the moment.
  • One call sends one message to one person. For a list of people, use campaigns.
  • It is not for AI agents. Keys of agents are refused here; they use the WizMessage MCP server, which has its own checks.

OpenAPI file

The whole API is described in one OpenAPI 3.1 file. Import it into your API client, or generate code from it. The tables on these pages are made from the same file.

Support

Write to [email protected] and add the request_id of the answer. Never send a key or a secret. If one may have been seen by somebody else, switch the key off in API Management at once and make a new one.

Trademarks

WhatsApp and Meta are trademarks of Meta Platforms, Inc. or its affiliates. Node.js, Python, PHP, curl, OpenAPI and other product names belong to their owners. They are used here only to say what WizMessage works with.

WizMessage is a product of Beth Technologies. It is not made, sponsored or endorsed by Meta, WhatsApp or any other company named here.