Skip to content

Errors & Pagination

Every error response follows this structure:

{
"error": {
"code": "sites.not_found",
"message": "Site '01j4k...' does not exist",
"request_id": "req_01j4k5m6n7p8q9r0",
"details": {
"field": "site_id"
}
}
}
FieldTypeDescription
codestringMachine-readable error code (dot-separated resource.verb)
messagestringHuman-readable description
request_idstringUnique ID for this request — include in bug reports
detailsobjectOptional extra context (field names, expected values)
StatusWhen
200 OKSuccessful read or update
201 CreatedResource created
204 No ContentSuccessful delete
400 Bad RequestMalformed request body
401 UnauthorizedMissing or invalid session/token
403 ForbiddenAuthenticated but wrong role or step-up needed
404 Not FoundResource doesn’t exist
409 ConflictDuplicate resource or invalid state transition
422 Unprocessable EntityValidation failure (see details)
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorUnexpected server error

List endpoints return cursor-based pagination. Example request + response:

GET /api/v1/sites?limit=20
{
"data": [
{ "id": "01j4k...", "name": "my-site", ... },
...
],
"next_cursor": "eyJpZCI6IjAxajRr...",
"has_more": true
}

To get the next page:

GET /api/v1/sites?limit=20&cursor=eyJpZCI6IjAxajRr...

When has_more is false, you’ve reached the last page.

ParameterDefaultMaxDescription
limit20100Items per page
cursorOpaque cursor from previous response

Cursors are stable for the lifetime of the underlying data. If the resource is deleted, the cursor skips over it.