Error Handling
The API uses standard HTTP status codes and returns errors as JSON.
Error Format
{
"error": "Description of what went wrong"
}Status Codes
| Code | Meaning |
|---|---|
400 | Bad request - invalid input or missing required fields |
401 | Unauthorized - invalid or missing API key |
404 | Not found - resource does not exist |
409 | Conflict - resource is in an incompatible state (e.g., starting a non-pending experiment) |
413 | Payload too large - request body exceeds size limit |
415 | Unsupported media type - invalid content type |
500 | Internal server error |
Validation Errors
When request body validation fails, the error message describes the first validation issue:
{
"error": "Expected string, received number"
}Common Errors
Missing required field:
{ "error": "Required" }Invalid UUID:
{ "error": "Invalid uuid" }State conflict:
{ "error": "Can only update pending experiments" }See the full API Reference for endpoint-specific error details.