Skip to main content
The Lofty API uses standard HTTP status codes combined with a code field in the response body for detailed error identification.

Response format

Error responses follow this structure:
An error does not always arrive with an error status. Failures raised by the service behind an endpoint — a duplicate name, a quota that is full, a referenced record that does not exist — are returned with HTTP 200 and an error body. Only failures the API gateway itself detects, such as a malformed or missing parameter, use a 4xx status.This is long-standing behaviour kept for compatibility with existing integrations, and it is the rule almost everywhere. Newer endpoints may answer a 4xx for the same failures — each one’s reference page lists what it returns, and POST /v1.0/transaction/customfields is the first that does.Which is why the status line alone is not a reliable success test. Test the body’s code instead — absent or 0 is success, anything else is the error — and it holds either way:

HTTP status codes

Authentication & permission errors

Validation errors (400)

Resource not found (404)

Lead errors (400)

Transaction errors (400)

Agent lifecycle errors (200 with error code)

POST /v2.0/agents/{agentId}/deactivate and POST /v2.0/agents/{agentId}/reactivate always return HTTP 200 once authentication passes. Check the response body’s code field (absent or 0 means success) rather than the status code.

Task errors (400)

Team & custom field errors (400)

Routing errors (400)

Webhook errors (400)

Rate limit (429)

When rate limited, the response includes:
See Rate Limiting for details.

Handling errors

Always check both the HTTP status code and the code field in the response body. Some business errors return specific codes (like 200100) that provide more detail than the HTTP status alone.