Errors
Every failure returns the same JSON body. Match on error, never on
message, which may be reworded at any time.
{
"error": "not_found",
"message": "No event with that id.",
"statusCode": 404
}
Codes
| Status | error | Meaning |
|---|---|---|
| 400 | validation_error | A parameter or body field was rejected. |
| 401 | invalid_api_key | The key is missing, unrecognised, or revoked. |
| 401 | malformed_api_key | The key failed its checksum, so it was damaged in transit. |
| 403 | plan_upgrade_required | The organization's plan does not include API access. |
| 404 | not_found | The requested resource does not exist. |
| 409 | conflict | The request conflicts with the resource's current state. |
| 429 | rate_limit_exceeded | Too many requests. See Rate limits. |
| 500 | internal_error | Something failed on our side. |
There is one code per failure mode rather than one per resource. A missing
event and a missing ticket both return not_found, and message says which.
A resource belonging to another organization also returns not_found rather
than 403, so ids cannot be probed across organizations.
Field failures
When a single field caused the rejection, message names it as
field: reason:
{
"error": "validation_error",
"message": "limit: Too big: expected number to be <=100",
"statusCode": 400
}
Several fields are joined with ; . A rejection that belongs to no
particular field, such as a business rule, explains itself in message the
same way.