Skip to content

Responses and errors

Most operations answer in one of the shapes below. A few older ones still differ, and the reference documents each operation’s exact answer. For example, GET /timer/orders returns a plain array.

{ "data": { "id": "…", "title": "…" } }
{
"data": [{ "id": "…" }],
"meta": { "page": 1, "perPage": 25, "total": 140, "totalPages": 6 }
}

Ask for another page with the page and perPage query parameters.

{
"data": [{ "id": "…" }],
"meta": { "limit": 50, "nextCursor": "…", "hasMore": true }
}

Pass nextCursor back to get the next part, until hasMore is false.

{ "data": null }
{ "error": { "message": "Task not found", "code": "NOT_FOUND", "status": 404 } }

message is written for people. code is for your code, and it is an open set: a newer server may send a code you haven’t seen, so handle the codes you know and fall back to the HTTP status for the rest. A validation error can carry more fields next to these three.

Code Usually means
UNAUTHORIZED No valid token.
FORBIDDEN Your role doesn’t allow this.
VALIDATION_ERROR, INVALID_INPUT The request body or parameters are wrong.
NOT_FOUND The record doesn’t exist, or you can’t reach it.
CONFLICT, ALREADY_EXISTS The record’s state doesn’t allow this, such as starting a second timer.
FIELD_LOCKED The field can’t be changed at this point.
DEPENDENCY_BLOCKED Another record blocks this change.
RATE_LIMITED Too many requests. Wait and retry.
MODULE_DISABLED The install has this module switched off.
WORKSPACE_SUSPENDED, NOT_WORKSPACE_MEMBER The organization is suspended, or you are not a member.
INTERNAL_ERROR Something failed on the server.

Dates and times are ISO 8601 strings in UTC. Fields that hold a calendar day use YYYY-MM-DD.