Error Handling
WazzAPI uses standard HTTP status codes and a consistent JSON error format.Error Format
All error responses share this structure:Common Error Codes
| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid parameters. Check details for specific field errors. |
UNAUTHORIZED | 401 | Missing or invalid API key. |
NOT_FOUND | 404 | The requested resource (message, contact) does not exist. |
RATE_LIMIT | 429 | Too many requests. Check Retry-After header. |
QUOTA_EXCEEDED | 429 | Monthly message quota limit reached. |
INTERNAL_ERROR | 500 | Something went wrong on WazzAPI’s side. |
Handling Specific Errors
Validation Errors (400)
The details object will contain validation messages keyed by the invalid field name.
Account Disconnected (400)
If the WhatsApp instance is disconnected (e.g., phone is offline or unlinked):
session.disconnected events and prompt the user to reconnect via the dashboard.