---
title: "POST /authz/grants"
method: POST
path: "/authz/grants"
tags: ["authz"]
---

# POST /authz/grants

`POST /authz/grants`

## Request body

- union — `grant` XOR `revoke` is expected
  - object
    - `grant` GrantBody[], required
      - `grant` 'RESTRICTED_READER' | 'READER' | 'WRITER' | 'OWNER', required
      - `resource_id` integer, required
      - `resource_type` 'infra' | 'rolling_stock', required
      - `subject_id` integer, required
  - object
    - `revoke` RevokeBody[], required
      - `resource_id` integer, required
      - `resource_type` 'infra' | 'rolling_stock', required
      - `subject_id` integer, required

## Response `201`

Successful granting

## Other responses

- `204` — Successful revoking

---

[API](https://skmtc.net/openrailassociation/apis/osrd-editoast.md) · [All operations](https://skmtc.net/openrailassociation/apis/osrd-editoast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrailassociation/osrd-editoast/versions/1840dbbd64ac/schema)
