Errors
The error envelope, every error code with its status, and how to react to each.
After this page you will be able to recognise every error the Workspace API returns and decide whether to fix the request, escalate or retry.
Prerequisites: none beyond a working call (see Overview).
The error envelope
A failed call answers with a non-2xx status and the same envelope as a success, with success: false:
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR",
"errors": ["limit: Too big: expected number to be <=100"],
"meta": { "timestamp": "2026-07-14T09:40:17.884Z" }
}| Field | Meaning |
|---|---|
success | Always false. |
message | A human-readable explanation. It can change: do not parse it. |
code | A stable, machine-readable code. Branch on it. |
errors | Optional details. One string per problem for VALIDATION_ERROR, the supported versions for UNSUPPORTED_VERSION. |
meta.timestamp | When the answer was produced (UTC). Quote it when you contact support. |
A 401 may arrive without this body: rely on the HTTP status for it.
Error codes
| Status | code | When | What to do |
|---|---|---|---|
| 401 | UNAUTHORIZED | The API key is missing or invalid. | Check the Authorization: Bearer <api key> header and the key. Do not retry unchanged. See Authentication. |
| 403 | FORBIDDEN | The key is valid but lacks the permission of the route (reviews:read for the reviews routes). | Ask your workspace admin for a key with the permission. |
| 404 | NOT_FOUND | The review does not exist, the id is malformed, the review belongs to another workspace, or the route does not exist. | Check the id and the path. |
| 404 | UNSUPPORTED_VERSION | The version in the path is not supported. errors lists the supported versions. | Use one of the listed versions. See Versioning. |
| 422 | VALIDATION_ERROR | A query parameter is invalid or out of range, a parameter is unknown, or the cursor is invalid or belongs to another sort. | Fix the request using errors. Retrying unchanged fails again. |
| 500 | INTERNAL_ERROR | Unexpected failure on our side. | Retry once; if it persists, contact support with meta.timestamp. |
| 503 | UNAVAILABLE | The service cannot answer right now. Temporary. | Retry with exponential backoff. |
Examples of errors for a 422:
| Request | Entry in errors |
|---|---|
?limit=500 | limit: Too big: expected number to be <=100 |
?countryCode=DE | query: Unrecognized key: "countryCode" |
?cursor=abc | cursor: cursor is not valid |
a cursor from sort=createdAt used with sort=rating | cursor: cursor does not belong to this sort |
Each entry starts with the parameter name (or query for an unknown parameter). The wording after the colon is meant for people and can change.
Retrying a 503
503 is temporary and the calls of this API are read-only, so retrying the same request is safe. We recommend exponential backoff with a few attempts and a little random jitter:
const delayMs = 1000 * 2 ** attempt + Math.random() * 250; // 1 s, 2 s, 4 s, 8 s
await new Promise((resolve) => setTimeout(resolve, delayMs));Do not retry 401, 403, 404 or 422 without changing something: the answer will be the same.
Handling errors in code
const response = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } });
if (response.status === 401) throw new Error("API key missing or invalid"); // maybe no JSON body
if (!response.ok) {
const error = await response.json();
switch (error.code) {
case "VALIDATION_ERROR": throw new Error(error.errors.join("; "));
case "UNAVAILABLE": /* retry with backoff */ break;
default: throw new Error(`${response.status} ${error.code}`);
}
}We recommend that your client also ignores unknown fields and unknown code values by treating them like their status class.
Next steps
- Authentication: fix
401and403. - Pagination: avoid cursor errors.
- Versioning: fix
UNSUPPORTED_VERSION.
Updated 6 days ago