---
title: "Check a permission"
method: POST
path: "/relation-tuples/check"
tags: ["permission"]
---

# Check a permission

`POST /relation-tuples/check`

To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.com/docs/keto/concepts/api-overview).

## Query parameters

- `max-depth` integer

## Request body

- PostCheckPermissionOrErrorBody — Post Check Permission Or Error Body
  - `namespace` string — Namespace to query
  - `object` string — Object to query
  - `relation` string — Relation to query
  - `subject_id` string — SubjectID to query Either SubjectSet or SubjectID can be provided.
  - `subject_set` SubjectSet
    - `namespace` string, required — Namespace of the Subject Set
    - `object` string, required — Object of the Subject Set
    - `relation` string, required — Relation of the Subject Set

## Response `200`

checkPermissionResult

- CheckPermissionResult — The content of the allowed field is mirrored in the HTTP status code.
  - `allowed` boolean, required — whether the relation tuple is allowed

## Other responses

- `400` — errorGeneric
- `403` — checkPermissionResult
- `default` — errorGeneric

## Changes

- **2022-11-25** `acd2fb10eb38` — 5 info
  - api operation id `postCheckMirrorStatus` removed and replaced with `postCheckPermissionOrError`
  - api tag `permission` added
  - api tag `read` removed
  - added the new optional `query` request parameter `max-depth`
  - …1 more
- **2022-06-15** `f1814d31f948` — 1 warning, 1 info
  - deleted the `query` request parameter `max-depth`
  - api operation id `postCheck` removed and replaced with `postCheckMirrorStatus`
- **2022-03-29** `5927be396871` — 1 info
  - endpoint added
- **2021-09-24** `b323fac0f51a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ory/apis/ory-keto/changes/relation-tuples/check/post.md)

---

[API](https://skmtc.dev/ory/apis/ory-keto.md) · [All operations](https://skmtc.dev/ory/apis/ory-keto/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-keto/revisions/305cb58cb754/schema)
