Errors
Every error answer has the same JSON body. error is a stable code you can branch on; message is for people and may change.
HTTP
HTTP/1.1 400 Bad Request
{
"error": "validation_failed",
"message": "Some fields are invalid",
"fields": {
"phone": "invalid",
"custom_fields.budget_lakh": "Enter a number"
},
"request_id": "01a0f0c2-0000-7000-8000-000000000000"
}fields names each invalid input (dotted paths such as english_test.overall or custom_fields.budget_lakh). Keep request_id: support can find the request with it.
Error codes
| Status | Code | What to do |
|---|---|---|
| 400 | validation_failed | Fix the fields listed in fields. |
| 400 | invalid_json | The body is not valid JSON. |
| 400 | consent_required | Send consent: true after the person agreed to be contacted. |
| 400 | captcha_failed | Public keys: the captcha token was missing or rejected. Ask the visitor to try again. |
| 401 | invalid_api_key | Check the key. It may be revoked or expired. |
| 402 | tenant_suspended | The workspace's subscription is not active. |
| 403 | insufficient_scope | Give the key the scope named in required, or use another key. |
| 403 | origin_not_allowed | Add the website to the key's allowed origins. |
| 403 | ip_not_allowed | Add the server's address to the key's IP list. |
| 404 | not_found | The record does not exist in this workspace. |
| 409 | idempotency_conflict | This Idempotency-Key was used with a different body. Use a new key for a new request. |
| 409 | idempotency_in_progress | The first request with this key is still running. Retry shortly. |
| 429 | rate_limited | Wait retry_after seconds, then retry. |
| 429 | quota_exceeded | Do not retry. The lead is held and released when the quota allows. |
| 500 | internal_error | Something failed on our side. Retry later with the same Idempotency-Key. |