Getting started
Responses
Understand ChatKazi response shapes.
ChatKazi returns JSON for every documented endpoint.
Success responses
Most successful responses include a message and data.
Example
{
"message": "Message sent.",
"data": {
"key": {
"remoteJid": "254712345678@s.whatsapp.net",
"fromMe": true,
"id": "..."
}
}
}
List endpoints return a data array:
Example
{
"data": [
{
"sessionId": "default",
"state": "connected",
"connected": true
}
]
}
Error responses
Example
{
"error": "Unauthorized",
"message": "Provide a valid API key using x-api-key or Authorization: Bearer <key>."
}
| Status | Meaning | What to do |
|---|---|---|
400 | A required field is missing or invalid. | Check the request body. |
401 | API key is missing or invalid. | Send a valid API key. |
402 | Monthly API hit limit reached. | Upgrade your plan or wait for the next cycle. |
403 | Message endpoint was called without an API key that can send messages. | Check the API key used for the request. |
409 | Session or phone number conflict. | Use another session name or disconnect the existing number. |
500 | Unexpected server error. | Retry later or contact support with the request details. |
Session states
| State | Meaning |
|---|---|
not_started | The session has not been started yet. |
connecting | ChatKazi is preparing the WhatsApp connection. |
qr_ready | A QR code is ready to scan. |
pairing_code_ready | A pairing code has been generated. |
connected | The WhatsApp number is ready to send messages. |
disconnected | The connection dropped or was not completed. |
logged_out | The session was logged out and must be connected again. |