The API uses standard HTTP status codes to indicate success or failure. Error responses include a detail field with a human-readable message.
Error Response Format
{
"detail": "Company not found"
}
For validation errors, the response includes field-level details:
{
"detail": [
{
"loc": ["body", "work_email"],
"msg": "value is not a valid email address",
"type": "value_error.email"
}
]
}
Status Codes
Success
Code
Meaning
Used By
200
OK
GET, PATCH, DELETE
201
Created
POST
Client Errors
Code
Meaning
Common Causes
400
Bad Request
Missing required fields, invalid field values, no fields in update
401
Unauthorized
Missing or invalid API key, expired API key, JWT token provided instead of API key. The X-Error-Code header (and the body’s code) is api_key_expired for an expired key and api_key_invalid otherwise: rotate an expired key, do not retry it.
404
Not Found
Resource does not exist or was deleted
422
Unprocessable Entity
Request body fails validation (wrong types, invalid email format)