Health

/v1/health

Check the status of your WhatsApp Business API Client with the health node. This node samples the health of the gateway to the WhatsApp server and sends back a JSON response.

Request

GET /v1/health

Response

The response will provide the status of the health of the gateway to the WhatsApp server.

Single instance

{
    "health": {
       "gateway_status": "connected | connecting | 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"
      },
    }
}

Note: In High Availability mode, only one Coreapp will be connected to the WhatsApp server, all other nodes including the primary master will have a gateway_status of disconnected. In Multiconnect mode with X shards, X Coreapps will be connected to the WhatsApp server, and the primary master will also connect to the WhatsApp server. To learn more about High Availability/Multiconnect mode, refer to the Availability and Scaling guide.

Parameters

NameDescriptionType

health

The health object contains the fields that describe the health of the WhatsApp Business API Client.

Object

gateway_status

Status of the connection between the Coreapp and WhatsApp servers.
Values:

  • connected, connecting — The health is good.
  • uninitialized — The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact WhatsApp Support if you continue to see this status.
  • unregistered — You need to register your WhatsApp Business API Client. See the Registration documentation for more information.

String

role

Role of the container in High Availability/Multiconnect setups
Values: primary_master, secondary_master, coreapp
See the Availability and Scaling documentation for more information on these setups.

String