Error Handling
Standard error response format for all API endpoints
All error responses follow a consistent JSON format:
{
"error": {
"code": "BAD_REQUEST",
"message": "Description of what went wrong"
}
}Error codes
| Code | HTTP Status | Description |
|---|---|---|
BAD_REQUEST | 400 | Invalid request body or parameters |
UNAUTHORIZED | 401 | Missing or invalid API key |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Duplicate resource (e.g., duplicate lead) |
INTERNAL_ERROR | 500 | Unexpected server error |