API requests are sent to:
https://whatsgate.org/api/v1/<command>
List of commands for WhatsApp instance management:
List of session management commands:
API authorization is done via the X-Api-Key request header. The Content-type: application/json header is also required.
X-Api-Key: YOUR_API_KEY Content-type: application/json
A JSON object is sent in the request body, with WhatsappID as a required parameter.
{
"WhatsappID": "YOUR_WHATSAPP_ID",
"number": "79999999999"
}
If everything succeeds, the response code is 200 and the body contains a JSON object. JSON fields depend on the command used.
{
"result": "OK",
"data": true
}
On error, the response code is 500. The returned object contains:
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0
}