---
title: "Assign role to user"
method: POST
path: "/access-control/users/{user_id}/roles"
tags: ["Access Control"]
---

# Assign role to user

`POST /access-control/users/{user_id}/roles`

Assigns a role to a user.

## Path parameters

- `user_id` string, required

## Request body

- AssignUserRoleRequest
  - `expires_at` string, date-time, nullable
  - `role_id` string, required

## Response `200`

OK

- AssignUserRoleResponse
  - `message` string, required

---

[API](https://skmtc.net/authula/apis/authula-api.md) · [All operations](https://skmtc.net/authula/apis/authula-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/authula/authula-api/versions/ee28a7965ce5/schema)
