API Cloud (MESSAGES)
The Cloud API is the easiest and most cost-effective way for businesses to use WhatsApp, with no updates required. All available features are described below.
Authentication
Service to obtain the authentication token used in each iteration. It is valid for 8 hours and only for the logged-in user.
Request
POST /login
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/login' \
--header 'Content-Type: application/json' \
--data '{
"username": "<user>",
"password": "<password>"
}'Response
Success (200)
{
"user": "<user>",
"access": true,
"access_token": "<valid token>"
}Sending messages
You must create a message template before you can send one. You can contact our team for guidance.
Several message types can be sent:
- Template messages
- Text messages
- Multimedia content messages
- Reaction messages
- Location messages
- Contact messages
- Interactive messages
To send them, make a POST /{version}/{did}/messages call and attach a message object with the desired type.
Every request must include the authentication header:
["Authorization" : "<JWT>"]Templates
Request
POST /{version}/{did}/messages
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"to": "{{Recipient-WA-ID}}",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}'Response
Success (200)
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "48XXXXXXXXX",
"wa_id": "48XXXXXXXXX"
}
],
"messages": [
{
"id": "wamid.gBGGSFcCNEOPAgkO_KJ55r4w_ww"
}
]
}Sending with BSUID (2026 identifiers)
In addition to the phone number (to), the messaging endpoints accept a BSUID or Parent BSUID recipient through the recipient field. The payload is forwarded to Meta as-is (passthrough), without mutating or reordering fields; if both to and recipient are sent, to takes priority.
131062.Text
Request
POST /{version}/{did}/messages
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "text",
"text": {
"preview_url": false,
"body": "text-message-content"
}
}'Response
Success (200)
Response with wamid (see Successful response).
Multimedia
In Cloud API, multimedia messaging includes all message types, including stickers and documents. You can send audio, document, image, sticker or video types; just change the type and the payload key.
Request — Image
POST /{version}/{did}/messages
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "image",
"image": {
"link": "http(s)://image-url"
}
}'Request — Document
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "document",
"document": {
"link": "http(s)://document-url"
}
}'Request — Sticker
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "sticker",
"sticker": {
"link": "http(s)://sticker-url"
}
}'Response
Success (200)
Response with wamid (see Successful response).
Flows
Request — Flow as an interactive message
POST /{version}/{did}/messages
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"recipient_type": "individual",
"messaging_product": "whatsapp",
"to": "whatsapp-id",
"type": "interactive",
"interactive": {
"type": "flow",
"header": { "type": "text", "text": "Flow message header" },
"body": { "text": "Flow message body" },
"footer": { "text": "Flow message footer" },
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.",
"flow_id": "1",
"flow_cta": "Book!",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "<SCREEN_NAME>",
"data": {
"product_name": "name",
"product_description": "description",
"product_price": 100
}
}
}
}
}
}'Request — Flow as a template
curl --request POST \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/v19.0/{did}/messages' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"recipient_type": "individual",
"messaging_product": "whatsapp",
"to": "whatsapp-id",
"type": "interactive",
"interactive": {
"type": "flow",
"header": { "type": "text", "text": "Flow message header" },
"body": { "text": "Flow message body" },
"footer": { "text": "Flow message footer" },
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.",
"flow_id": "1",
"flow_cta": "Book!",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "<SCREEN_NAME>",
"data": {
"product_name": "name",
"product_description": "description",
"product_price": 100
}
}
}
}
}
}'Response
Success (200)
Response with wamid (see Successful response).
Successful response
In all cases, the successful response returns an object with an identifier prefixed with wamid:
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "48XXXXXXXXX",
"wa_id": "48XXXXXXXXX"
}
],
"messages": [
{
"id": "wamid.gBGGSFcCNEOPAgkO_KJ55r4w_ww"
}
]
}Attachments
The GET /v15.0/{id}/{did}/media route returns a multimedia file. It must include the authentication header:
["Authorization" : "<JWT>"]Client webhook
The PATCH /webhooks/inbound route adds or changes the endpoint that will receive the client’s inbound messages.
Request
PATCH /webhooks/inbound
curl --request PATCH \
--url 'https://channels.chattigo.com/bsp-cloud-chattigo-isv/webhooks/inbound' \
--header 'Authorization: <JWT>' \
--header 'Content-Type: application/json' \
--data '{
"waId": "<channel identifier>",
"externalWebhook": "<secure HTTPS URL>"
}'| Field | Type | Required | Description |
|---|---|---|---|
waId | String | Yes | Channel identifier. |
externalWebhook | String | Yes | Client URL for inbound message dispatch. |
Response
Success (200)
{
"waId": "<channel identifier>",
"externalWebhook": "<secure HTTPS URL>"
}Errors
General errors
Endpoints that require token authorization present the following errors:
| Code | Message |
|---|---|
401 | JWT was invalid (wrong token) |
401 | unauthorized Access (token with insufficient permissions) |
401 | token up for parsing was not passed through the header... (empty token) |
Specific errors
POST /login
| Code | Message |
|---|---|
400 | invalid Password (wrong password) |
400 | unsupported get request. username '<user>' does not exist... (wrong user) |
POST /{did}/messages
| Code | Message |
|---|---|
400 | (#131030) Recipient phone number not in allowed list (wrong payload) |
400 | unsupported get request. Object with ID '<bad-did>' does not exist... (wrong did) |
GET /{id}/{did}/media
| Code | Message |
|---|---|
400 | unsupported get request. Object with ID 'did-bad' does not exist (wrong did) |
400 | Unsupported get request. Object with ID '<id>' does not exist... (wrong id) |
PATCH /webhooks/inbound
| Code | Message |
|---|---|
400 | unsupported get request. Object with ID 'XXXXXXX' does not exist (wrong waId) |