Errors
An error answers a 4xx or 5xx status and a body with a stable key, a readable message and the ID of the call:
{ "error": "VALIDATION_ERROR", "message": "Check the data you sent", "traceId": "4f0c2a9e-6f1d-4c55-9d1e-2b7f3f2c8a10", "fields": [ { "field": "contact.email", "message": "Must be a valid email address" }, { "field": "subject", "message": "Must be at least 3 characters long" } ]}| Field | Meaning |
|---|---|
error |
Stable key. Branch on it in your code. |
message |
Explanation for people, in the language of Accept-Language. It may change; don’t parse it. |
traceId |
ID of the call, also in the X-Request-ID header. Quote it to support. |
fields |
Only for validation errors: each invalid field, by its path in the body (contact.email), with its message. |
data |
Only on some errors: values that help you react, such as the limit that was reached. |
Handling errors
Section titled “Handling errors”- 400 and 422: fix the request. Show
fieldsnext to your form inputs. - 401: the key is missing, wrong, revoked or expired.
- 403: the key lacks a scope, the plan does not include the API, the subscription is read-only, or a plan limit was reached.
- 404: the request, attachment or webhook does not exist in this workspace.
- 409: the request changed meanwhile or is in a state that does not allow the change. Read it again and decide.
- 429: slow down and retry after
Retry-Afterseconds. See Rate limits. - 5xx: retry with exponential backoff. Requests that open a resource are not idempotent: read before retrying a
POSTthat may have succeeded.
Error keys
Section titled “Error keys”| Status | error | message |
|---|---|---|
| 400 | INVALID_REQUEST | The request is not valid |
| 400 | REQUEST_FAILED | The request could not be processed |
| 401 | API_KEY_INVALID | The API key is not valid, was revoked or has expired |
| 401 | API_KEY_MISSING | Send your API key in the Authorization: Bearer <key> header |
| 403 | API_ACCESS_NOT_INCLUDED | The organization's plan does not include API access |
| 403 | API_KEY_SCOPE_MISSING | The API key does not have the {scope} scope |
| 403 | ORGANIZATION_INACTIVE | The organization is not active |
| 403 | SUBSCRIPTION_READ_ONLY | The subscription has an overdue payment and the API only allows reads |
| 403 | WEBHOOK_LIMIT_REACHED | The plan allows up to {limit} active integrations |
| 404 | API_VERSION_UNSUPPORTED | API version {version} does not exist. Available versions: {versions} |
| 404 | ATTACHMENT_NOT_FOUND | The attachment was not found |
| 404 | NOT_FOUND | The resource was not found |
| 404 | ROUTE_NOT_FOUND | The route does not exist in this API version |
| 404 | TICKET_NOT_FOUND | Request {number} was not found |
| 404 | WEBHOOK_NOT_FOUND | The webhook was not found |
| 409 | INVALID_TICKET_TRANSITION | The request cannot change from {from} to {to} |
| 409 | TICKET_CONCURRENT_CHANGE | The request changed while yours was being processed. Read it again and retry |
| 409 | TICKET_PRIORITY_CHANGE_PENDING | A priority raise is already awaiting approval for this request |
| 409 | TICKET_WORK_BLOCKED | Work cannot continue at stage {stage} until pending approvals or critical prerequisites are completed |
| 409 | TICKET_WORKFLOW_NOT_CONFIGURED | The workspace has no statuses configured yet. Open the portal once to create them |
| 409 | WEBHOOK_NAME_TAKEN | A webhook with that name already exists in this workspace |
| 413 | ATTACHMENT_TOO_LARGE | The file exceeds the {max} MB limit |
| 415 | ATTACHMENT_TYPE_NOT_ALLOWED | File type not allowed. Allowed: {allowed} |
| 422 | ATTACHMENT_EMPTY | The file is empty |
| 422 | ATTACHMENT_FILE_REQUIRED | Send the file in the file field of a multipart form |
| 422 | DEPARTMENT_NOT_FOUND | The department does not exist or is inactive |
| 422 | LOCATION_NOT_FOUND | The location does not exist or is inactive |
| 422 | SERVICE_NOT_FOUND | The service does not exist, is not published or is not available to this workspace |
| 422 | TICKET_NOTHING_TO_CHANGE | Give the status or the priority to change |
| 422 | TICKET_PRIORITY_NOTE_REQUIRED | Give a reason for the priority change (at least 3 characters) |
| 422 | TICKET_TRANSITION_CLOSURE_CODE_REQUIRED | To move the request to {to}, enter the closure code |
| 422 | TICKET_TRANSITION_REASON_REQUIRED | To move the request to {to}, give a reason for the change (at least 3 characters) |
| 422 | TICKET_TRANSITION_SOLUTION_REQUIRED | To move the request to {to}, describe the applied solution (at least 3 characters) |
| 422 | VALIDATION_ERROR | Check the data you sent |
| 422 | WEBHOOK_EVENT_UNKNOWN | Unknown event: {event}. Available: {events} |
| 422 | WEBHOOK_URL_NOT_ALLOWED | The URL must be https and point to a public address |
| 429 | RATE_LIMITED | Too many requests. Try again in {retryAfter} seconds |
| 429 | TICKET_QUOTA_REACHED | The organization reached its limit of {limit} requests this month |
| 500 | INTERNAL_SERVER_ERROR | An unexpected error occurred |
| 502 | ATTACHMENT_STORAGE_ERROR | The file could not be stored or read. Try again |
Validation messages inside fields use their own keys (VALIDATION_REQUIRED, VALIDATION_MAX_LENGTH…); rely on field to tell them apart and show message as is.