Skip to content

Check

Check a single authorization relationship.

Request

{
"subject": "user:alice",
"relation": "editor",
"object": "document:42"
}

Response 200

{
"authorized": true,
"checked_at": "2026-04-14T10:22:00Z"
}

Batch authorization check. Max 100 per call. Results are returned in input order.

Request

{
"checks": [
{ "subject": "user:alice", "relation": "editor", "object": "document:42" },
{ "subject": "user:bob", "relation": "viewer", "object": "document:42" }
]
}

Response 200

{
"results": [
{ "authorized": true },
{ "authorized": false }
],
"checked_at": "2026-04-14T10:22:00Z"
}
StatusTypeMeaning
400invalid-subjectSubject is not of the form namespace:external_id.
400invalid-relationRelation is not one of the built-in relations.
400invalid-objectObject is not of the form namespace:external_id.
400bulk-too-largeMore than 100 checks in a single request.
401unauthorizedMissing or invalid bearer token.
429rate-limitedPer-tenant rate limit exceeded.