Identifies the Official API app and connected Cloud API number.
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.
Authorizes the workspace owner who owns the app.
Endpoints
Message API endpoints
/api/whatsapp/messageDefault text endpoint. You may also pass type in the payload./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
Endpoint
https://wachamp.com/api/whatsapp/messagecurl --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
| Field | Type | Required | Description |
|---|---|---|---|
appkey | string | Yes | App key from an Official WhatsApp API app. |
authkey | string | Yes | Workspace owner auth key. |
to | string | Yes | Receiver number with country code, without spaces. |
type | string | No | Message type when using the base endpoint. |
message/body/text | string | Text/interactive | Message body. |
media_url/link/url | string | Media | Public URL for image, video, audio, voice, or document. |
caption | string | No | Optional media caption. |
filename | string | Document | Optional document filename. |
button_1/button_2/button_3 | string | Button | Quick reply button titles. Maximum three buttons are sent. |
buttons | array | Button | Alternative button array with id/title values. |
button_text | string | List | List open button text. |
sections | array | List | List sections with rows. |
display_text | string | CTA | CTA button label. |
button_url | string | CTA | CTA destination URL. |
latitude/longitude | number | Location | Location coordinates. |
contacts/contact/name | array/string | Contact | Contact payload or simple contact name. |
template_name | string | Template | Approved WhatsApp template name. |
language | string | Template | Template language code. Default is en_US. |
components | array | No | Template 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."]
}
}