---
title: "AssignRole"
method: POST
path: "/api/roles/{role_slug}/assign"
tags: ["User Account Roles"]
---

# AssignRole

`POST /api/roles/{role_slug}/assign`

Assign a role to a user.

Returns:
    Success message indicating role assignment status.

## Path parameters

- `role_slug` string, required — The role to grant.

## Request body

- UserRoleAdd
  - `userName` string, required

## Response `201`

Document created, URL follows

- Message
  - `message` string, required

## Other responses

- `400` — Bad request syntax or unsupported method

---

[API](https://skmtc.net/litestar-org/apis/app.md) · [All operations](https://skmtc.net/litestar-org/apis/app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/litestar-org/app/versions/461f3baecebb/schema)
