Skip to main content
POST /v1/tenants/{tenant_id}/permissions/bulk-check The Bulk Check API evaluates up to 100 permission pairs in one request. All checks share the same metadata context (snap token, schema version, depth) and an optional shared context object. This is particularly useful for rendering UIs where many elements need authorization gating simultaneously.
All items in a bulk-check request are evaluated against the same snapshot of your authorization data, giving you a consistent view across the entire batch.

Path Parameters

tenant_id
string
required
The tenant identifier. Use t1 for single-tenant deployments. Must match ^([a-zA-Z0-9_\-@\.:+]{1,128}|\*)$.

Request Body

metadata
object
required
Shared metadata applied to all checks in the batch.
items
array
required
The list of permission checks to evaluate. Between 1 and 100 items.
context
object
Contextual data shared across all checks in the batch.

Response

results
array
Ordered list of check results, one per item in the request.

Example

curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/bulk-check' \
--header 'Content-Type: application/json' \
--data-raw '{
  "metadata": {
    "snap_token": "",
    "schema_version": "",
    "depth": 20
  },
  "items": [
    {
      "entity": { "type": "document", "id": "1" },
      "permission": "edit",
      "subject": { "type": "user", "id": "1" }
    },
    {
      "entity": { "type": "document", "id": "2" },
      "permission": "view",
      "subject": { "type": "user", "id": "1" }
    }
  ]
}'
Request body
{
  "metadata": {
    "snap_token": "",
    "schema_version": "",
    "depth": 20
  },
  "items": [
    {
      "entity": { "type": "document", "id": "1" },
      "permission": "edit",
      "subject": { "type": "user", "id": "1" }
    },
    {
      "entity": { "type": "document", "id": "2" },
      "permission": "view",
      "subject": { "type": "user", "id": "1" }
    }
  ]
}
Response
{
  "results": [
    {
      "can": "RESULT_ALLOWED",
      "metadata": { "check_count": 2 }
    },
    {
      "can": "RESULT_DENIED",
      "metadata": { "check_count": 1 }
    }
  ]
}

Error Codes

HTTP StatusDescription
400Bad request — missing fields or more than 100 items
401Unauthorized
404Tenant not found
429Rate limit exceeded
500Internal server error

Build docs developers (and LLMs) love