Errors
Leadveyor uses standard HTTP status codes, and every error response has the same shape, so you can handle errors in one place.
{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "status: Invalid option: expected one of \"won\"|\"lost\"|\"no_response\"|\"disqualified\"|\"other\"",
"param": "status",
"request_id": "5d1f0c2a-8b7e-4f3a-9c61-2e4b7a9d0f13"
}
}
type— the category below.code— a stable, machine-readable code such aslead_not_foundorinsufficient_permission. Branch on this, not on the message.message— a human-readable explanation.param— the parameter that caused the error, when there is one.errors— for profile documents, every problem at once:[{ "path": "criteria[2].condition.field", "message": "…" }].request_id— include it when you contact support.
Types
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request_error | A parameter is missing or invalid. |
| 401 | authentication_error | No key, or an invalid, revoked or expired key or session. |
| 402 | quota_error | The plan's allowance for this period is used up (quota_exceeded, spend_limit_reached, workspace_limit_reached). See Plans and limits. |
| 403 | permission_error | The key doesn't have the permission, or can't access this workspace. |
| 404 | not_found_error | The object doesn't exist in this workspace and mode. |
| 409 | conflict_error | The request conflicts with the current state, e.g. publishing a profile without a draft. |
| 429 | rate_limit_error | Too many requests for your plan; retry later. |
| 500 | api_error | Something went wrong on our side; safe to retry. |
Processing errors (for example an AI provider outage) don't fail your request: the message is accepted, retried automatically, and a final failure is recorded on the inbound and sent as an inbound.failed event.