2xx code means the request worked, a 4xx code means something in the request has to change, and a 5xx code means the problem is on our side.
Error body
Error responses are JSON objects with a human-readablemessage and the request_id of the request:
A few errors, such as a request to an unknown path, return the description in
detail instead of message. Read message first and fall back to detail.Validation errors
When the request body or its parameters are not valid, the API answers400 Bad Request with Content-Type: application/problem+json and one entry per invalid field:
Request ID
Every response carries the request ID in theX-Request-Id header, and error responses also include it in the body as request_id. Both hold the same value. When you contact support about a failed request, send us its request_id: it lets us find that exact request. We generate the ID for every request; log it on your side next to your own request identifiers.
Status codes
Retrying requests
Retry only the errors that can succeed later:429, 500, 502, 503 and 504. Wait longer between attempts (for example 1, 2, 4 and 8 seconds) and stop after a few attempts. Other 4xx errors return the same answer until you change the request.
Failed tasks
An error status code means the request itself failed. A task that was created correctly can still fail later while it runs: in that case theGET endpoint of the task, and the webhook if you set one, return the task with status: FAILED. Use the task_id when you ask us about a failed task.