Official WhatsApp Cloud API

Official WhatsApp API Documentation

Public reference for sending customer messages through Wachamp Official WhatsApp API apps. This page is only for Official Cloud API numbers, not WhatsApp Web QR devices.

POST https://wachamp.com/api/whatsapp/message
{
  "appkey": "YOUR_OFFICIAL_APP_KEY",
  "authkey": "YOUR_AUTH_KEY",
  "to": "923001234567",
  "message": "Hello from Wachamp"
}
Authentication

Required keys

Create an Official API app inside Wachamp to get the app key. Use the workspace owner's auth key with every request. Keep both values private in your server-side code.

appkey

Identifies the Official API app and connected Cloud API number.

authkey

Authorizes the workspace owner who owns the app.

Endpoints

Message API endpoints

POST/api/whatsapp/messageDefault text endpoint. You may also pass type in the payload.
POST/api/whatsapp/message/{type}Typed endpoint for text, image, video, audio, voice, document, location, contact, button, list, cta_url, interactive, or template.
Examples

Request samples

Endpointhttps://wachamp.com/api/whatsapp/message
curl --location --request POST 'https://wachamp.com/api/whatsapp/message' \
--header 'Content-Type: application/json' \
--data-raw '{
  "appkey": "YOUR_OFFICIAL_APP_KEY",
  "authkey": "YOUR_AUTH_KEY",
  "to": "923001234567",
  "message": "Hello from Wachamp Official API"
}'
JSON payload
{
  "appkey": "YOUR_OFFICIAL_APP_KEY",
  "authkey": "YOUR_AUTH_KEY",
  "to": "923001234567",
  "message": "Hello from Wachamp Official API"
}
Parameters

Accepted request fields

FieldTypeRequiredDescription
appkeystringYesApp key from an Official WhatsApp API app.
authkeystringYesWorkspace owner auth key.
tostringYesReceiver number with country code, without spaces.
typestringNoMessage type when using the base endpoint.
message/body/textstringText/interactiveMessage body.
media_url/link/urlstringMediaPublic URL for image, video, audio, voice, or document.
captionstringNoOptional media caption.
filenamestringDocumentOptional document filename.
button_1/button_2/button_3stringButtonQuick reply button titles. Maximum three buttons are sent.
buttonsarrayButtonAlternative button array with id/title values.
button_textstringListList open button text.
sectionsarrayListList sections with rows.
display_textstringCTACTA button label.
button_urlstringCTACTA destination URL.
latitude/longitudenumberLocationLocation coordinates.
contacts/contact/namearray/stringContactContact payload or simple contact name.
template_namestringTemplateApproved WhatsApp template name.
languagestringTemplateTemplate language code. Default is en_US.
componentsarrayNoTemplate components for variables, media, or buttons.
Response

Success and error format

Successful sends return a message id and status. Validation errors return HTTP 422 with field errors. Other send failures return success false with an error message.

{
  "success": true,
  "data": {
    "mid": "wamid.example",
    "status": "sent"
  }
}
{
  "success": false,
  "errors": {
    "to": ["The to field is required."]
  }
}