Error Response Format
When an error occurs, the API returns a standardized JSON response:Error Codes
| Code | HTTP Status | Description |
|---|---|---|
AUTH_FAILED | 401 | Invalid or missing API key |
INVALID_PAYLOAD | 400 | Missing required fields in request body |
VALIDATION_ERROR | 400 | Field format is incorrect (e.g., invalid email) |
NOT_FOUND | 404 | Requested resource (lead ID) doesn’t exist |
RATE_LIMITED | 429 | Too many requests - slow down |
SERVER_ERROR | 500 | Unexpected server issue |
Error Examples
AUTH_FAILED
Missing or invalid API key:INVALID_PAYLOAD
Required field missing:VALIDATION_ERROR
Field format incorrect:NOT_FOUND
Lead doesn’t exist or doesn’t belong to your partner account:RATE_LIMITED
Exceeded request limits:Rate Limits
Default limits per partner:| Direction | Limit |
|---|---|
| Inbound (Partner → Credzu) | 100 requests/minute |
| Outbound (Credzu → Partner webhooks) | 300 callbacks/minute |
If you need higher limits for enterprise volume, contact Credzu support to request increased quotas.
Best Practices
1
Check HTTP status codes
Use HTTP status codes for initial error classification (4xx = client error, 5xx = server error).
2
Parse the error code
Use the
error.code field to determine the specific error type and handle accordingly.3
Log the full response
Store the complete error response for debugging and support requests.
4
Implement retry logic
For
SERVER_ERROR or RATE_LIMITED, implement exponential backoff before retrying.