Documentation
Public Endpoint Reference
The customer-facing endpoints your application can call directly at runtime.
Public Endpoint Reference
This page lists the customer-facing endpoints your application can call directly.
Authentication
All public endpoints use a project API key.
Authorization: Bearer <project-api-key>
Content-Type: application/json
If the API key is missing or invalid, the current auth middleware responds with plain text:
unauthorized
GET /v1/config
Returns the authenticated project's feature, action, and role map.
Use it when your application needs a project-scoped authorization snapshot.
Request body: none
Response:
Field notes:
versionis a hash of the current project authorization configdescriptionis omitted when a feature or role does not define one- auth failures still return plain-text
unauthorized
POST /v1/check
Runs one authorization decision for a subject.
Request body:
{
"subject": "user:alice",
"feature": "billing",
"action": "read",
"tenant": "tenant_acme"
}
Response:
Field notes:
subject,feature, andactionare requiredtenantis optional, but if present it must not be an empty string- invalid request bodies return
{ "error": "..." } - internal evaluation failures fail closed as
{ "allowed": false, "reason": "error" } - auth failures still return plain-text
unauthorized
For more detail, see Check Endpoint.
POST /v1/check/batch
Runs multiple authorization decisions for the same subject and optional tenant context.
Request body:
{
"subject": "user:alice",
"tenant": "tenant_acme",
"checks": [
{ "feature": "billing", "action": "read" },
{ "feature": "billing", "action": "write" },
{ "feature": "reports", "action": "export" }
]
}
Response:
Field notes:
subjectis requiredchecksmust be a non-empty array- each item in
checksrequiresfeatureandaction - request-level failures return
{ "error": "..." } - per-item evaluation failures remain
200 OKand produceresults[].reason = "error" - auth failures still return plain-text
unauthorized
For more detail, see Check Endpoint.
POST /v1/subjects/upsert
Creates or updates a subject from your application runtime when you need Thauth to reflect current subject assignments programmatically.
Use it when your application owns subject synchronization and wants to push role IDs or override-backed permissions into the project-scoped public plane.
Request body:
{
"subject_id": "user:alice",
"subject_type": "user",
"tenant_id": "tenant_acme",
"role_ids": [
"334858ea-4454-4f5e-84ae-afd1c0644d85"
],
"permissions": [
{
"feature_id": "6ea4a805-a7fa-4136-8995-7edfe15c4a0f",
"action": "read",
"effect": "allow"
}
]
}
Response:
Field notes:
subject_idandsubject_typeare requiredrole_idsmust contain UUID strings when providedpermissions[].feature_idmust be a UUID stringpermissions[].effectmust be eitherallowordeny- common not-found responses are
role not found,feature not found, andaction not found for this feature - auth failures still return plain-text
unauthorized
If your application only needs customer-facing authorization calls, the public /v1/* endpoints above are the relevant surface.