---
title: "Add a new assignment"
method: POST
path: "/authorization/assignments"
tags: ["Authorization"]
---

# Add a new assignment

`POST /authorization/assignments`

Adds a new assignment
This endpoint requires the permission "authorization.rbac.write".

## Request body

- AssignmentPayload
  - `identity` IdentityPayload
    - `key` string
    - `user` string
  - `roles` string[]

## Response `200`

The assignment has been added

## Other responses

- `400` — Invalid assignment
- `500` — Internal error

---

[API](https://skmtc.dev/cargill/apis/splinterd-api.md) · [All operations](https://skmtc.dev/cargill/apis/splinterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cargill/splinterd-api/revisions/38a272c24bd9/schema)
