---
title: "POST /user_roles"
method: POST
path: "/user_roles"
tags: ["User Management"]
---

# POST /user_roles

`POST /user_roles`

## Request

- Base URL: `https://sort.veritas.com/infoscale/api/2.0`
- URL: `https://sort.veritas.com/infoscale/api/2.0/user_roles`
- Auth: none declared
- TypeScript: <https://skmtc.dev/veritas/apis/veritas-infoscale-api/docs/user_roles/post.ts> (a function with typed inputs; its response is checked against the schema)

Add new REST users in REST Server.

## Headers

- `token` string

## Request body

- UserCreateRequest
  - `userName` string, required: The name of the user.
  - `roles` string[], required: The roles of the user.

## Response `201`

Successfully assigned the role to the user.

- UserDetailResponse
  - `username` string: The name of the user.
  - `role` string: The role of the user.

## Other responses

- `400`: The user name or the role is incorrect or not specified.
- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/veritas/apis/veritas-infoscale-api.md) - [All operations](https://skmtc.dev/veritas/apis/veritas-infoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/veritas/apis/veritas-infoscale-api/revisions/1e3d3f7145bb?raw)
