Skip to content
Dashboard
Theme
Theme

Check one permission

POST /v1/authorization/check: Check one permission.

View Markdown

POST /v1/authorization/check

Answers whether a membership (or a user in an organization) holds a permission, on the whole organization or on one resource. Served from a cache validated on every call; an unknown subject is denied, not an error.

Scope
authorization:read
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • membership string

  • user string

  • organization string

  • permission string Required

    A permission the developer’s app checks, such as reports:read.

  • resource AuthzResource

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/authorization/check" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"permission": "organizations:read"
}'
Response 200
{
"object": "authorization_decision",
"authorized": true,
"membership": "om_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}