Skip to main content
FormBharo returns structured JSON error bodies on every non-2xx response. There are four distinct error shapes, and knowing which one to expect for a given scenario makes error handling straightforward.

Error body shapes

Returned by the authentication layer before the request reaches any endpoint logic. This shape always means the API key is missing, malformed, or invalid.
string
A short human-readable description of the authentication problem.
Paired with HTTP 401.
Returned when an operation fails for a business-logic reason — for example, when you reference an agent or conversation that does not exist.
string
A short human-readable description of why the operation failed.
Paired with HTTP 404 (not found), 403 (forbidden), or 400 (bad request) depending on the nature of the failure.
Returned when agent creation or update fails because the request body contains invalid configuration. See Agent Configuration and Branching for the fields that can trigger this response.
array
A list of all validation failures found in the request. The save is atomic — fix every issue and resubmit.
Paired with HTTP 400.
Returned when PATCH /api/v1/agents/{agent_id}/conversations/{conversation_id}/form_data fails because one or more submitted values do not pass the question’s validation rules. See Validation for the full rule reference.
string
Always "Validation failed" for this shape.
object
A map of field names to failure details. Nothing is saved if this object is non-empty — fix all fields and resubmit.
Paired with HTTP 400.

HTTP status codes