---
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

## Changes

> 82 revisions in range; 2 not diffed.

- **2026-08-20** `c4f3ea65fcc2` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-08-19** `3b2254859e4e` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-08-18** `b418fa7ba8eb` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-08-12** `71899a400dfa` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the request body `oneOf` list
  - added `subschema #1, subschema #2` to the request body `oneOf` list
- **2026-08-03** `1840dbbd64ac` — 1 info
  - added the new `RESTRICTED_READER` enum value to the request property `oneOf[subschema #1]/grant/items/grant`

[Full history](https://skmtc.dev/openrailassociation/apis/osrd-editoast/changes/authz/grants/post.md)

---

[API](https://skmtc.dev/openrailassociation/apis/osrd-editoast.md) · [All operations](https://skmtc.dev/openrailassociation/apis/osrd-editoast/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openrailassociation/osrd-editoast/revisions/e1fc96bc11fd/schema)
