Resources · 3 min read
Errors
What went wrong, and how to fix it.
When a request fails, you get a normal HTTP status and a JSON body like this:
{
"error": {
"code": "validation_failed",
"message": "The contact is invalid.",
"details": [
{ "field": "email", "message": "Invalid email format" },
{ "field": "favourite_colour", "message": "Unknown field" }
]
}
}code— a short, fixed name for the problem. Use this in your code.message— a readable explanation. It may change, so show or log it, but don't rely on its wording.details— included on some errors. Each entry says whichfieldis wrong and why (fieldisnullwhen it's not about one field).
What to do
4xx— something in your request needs fixing. Don't send it again unchanged. (For429, wait theRetry-Afterseconds and try again.)5xx— a problem on our side. Retry after 1s, then 2s, then 4s, and stop after a few tries. Still failing? Email support@intertoons.com with the time and endpoint.409 duplicate— the contact already exists. Find it withGET /api/v1/contacts?q=…and update it instead.
All error codes
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | bad_request |
The request could not be read: the body is not valid JSON, is not a JSON object, or a path id is not a UUID. | Send Content-Type: application/json with a JSON object body, and check the id in the URL. |
| 401 | unauthorized |
No API key was sent. | Send your key as Authorization: Bearer zig_live_… (or X-API-Key). |
| 401 | invalid_api_key |
The key is unknown, expired or revoked. A ZigCRM login token is not accepted either. | Check the key was copied in full, or create a new one in Settings → API Keys. |
| 403 | insufficient_scope |
The key does not have the scope this endpoint needs. | Create a key with the required scope (shown on each endpoint in the API reference). |
| 403 | quota_exceeded |
Your plan's contact limit is reached, so no more contacts can be created. | Delete unused contacts or upgrade your plan. |
| 404 | not_found |
The contact (or endpoint) does not exist in your account. Contacts of other accounts are also reported as not found. | Check the id, and that the contact was not deleted. |
| 409 | duplicate |
Another contact in your account already has this phone number, email or GST number. details[0].field says which. |
Search for the existing contact (GET /api/v1/contacts?q=…) and update it instead. |
| 409 | conflict |
The contact cannot be deleted while deals, tasks or notes are linked to it. details lists them. |
Delete or reassign the linked records in ZigCRM first. |
| 422 | validation_failed |
One or more fields or query parameters are invalid. details has one entry per problem: { field, message }. |
Correct the listed fields. Unknown fields are rejected too — send only documented fields. |
| 429 | rate_limited |
The key made more than 120 requests in a minute. | Wait for the number of seconds in the Retry-After header, then retry. Spread requests out or batch work. |
| 500 | internal_error |
Something went wrong on ZigCRM's side. No internal details are returned. | Retry with backoff. If it keeps happening, contact support with the time and endpoint. |
New codes may be added. If you see one you don't know, go by its HTTP status.