Use of WhatsApp API

The document explains how to access the WhatsApp Business API.

Feel free to get a free Test Account which will allow you to start developing directly.

The WhatsApp API supports all endpoints from WhatsApp docs, except for the ones blacklisted below. Additionally we enable you to set your base path.

Base Path will be provided when requesting your API Key.

Within the response you need to use the URL from the address variable.

Blacklisted paths:

Basic Facebook endpoints

get
/health

https://waba.360dialog.io/v1/health/
This endpoint returns the status of your WhatsApp Business API client.
Request
Response
Request
Headers
D360-API-KEY
required
string
your API KEY
Response
200: OK
# Single Instance
{
"health": {
"gateway_status": "connected | connecting | disconnected | uninitialized | unregistered"
}
}
# High Availability/Multiconnect
{
"health": {
"your-hostname1:your-container-id1": {
"gateway_status": "connected | connecting | disconnected | uninitialized | unregistered",
"role": "primary_master | secondary_master | coreapp"
},
"your-hostname2:your-container-id2": {
"gateway_status": "connected | connecting | disconnected | uninitialized | unregistered",
"role": "primary_master | secondary_master | coreapp"
},
}
}40
401: Unauthorized
{
"meta": {
"success": false,
"http_code": 401,
"developer_message": "Invalid api key"
}
}

Do not call this endpoint more than once every 5 minutes, as the health status is cached and refreshed only every 5 minutes.

In High Availability mode, only one Coreapp maintains a connection to the WhatsApp server. All other nodes (including the Primary Master) have a gateway_status of disconnected

In Multiconnect mode with X shards, X Coreapps maintain a connection to the WhatsApp server. The Primary Master also connects to the WhatsApp server.

To learn more about High Availability/Multiconnect mode, please refer to Facebooks Availability and Scaling guide.

Additional 360dialog endpoints

get
/phone_number

https://waba.360dialog.io/v1/configs/phone_number
This endpoint returns the registered phone number for a given D360-API-KEY.
Request
Response
Request
Headers
D360-API-KEY
required
string
Your API KEY
Response
200: OK
{
"phone_number": phone_number_string
}
401: Unauthorized
{
"meta": {
"success": false,
"http_code": 401,
"developer_message": "Invalid api key"
}
}