---
title: "Create a new role and the associated actions"
method: POST
path: "/api/roles"
tags: ["Role Management"]
---

# Create a new role and the associated actions

`POST /api/roles`

## Request body

- RoleDetailsModel
  - `id` string, nullable
  - `name` string, nullable
  - `color` string, nullable
  - `description` string, nullable
  - `actions` string[], nullable

## Response `201`

Created

- RoleDetailsModel
  - `id` string, nullable
  - `name` string, nullable
  - `color` string, nullable
  - `description` string, nullable
  - `actions` string[], nullable

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/cgi-fr/apis/azure-iot-hub-portal-api.md) · [All operations](https://skmtc.net/cgi-fr/apis/azure-iot-hub-portal-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cgi-fr/azure-iot-hub-portal-api/revisions/8f5ec4f45de1/schema)
