---
title: "Create a role"
method: POST
path: "/api/v1/roles"
tags: ["role"]
---

# Create a role

`POST /api/v1/roles`

This can only be done by a logged in user who has the required privileges.

## Request body

- MutableRole
  - `name` string
  - `description` string
  - `permissions` Permissions[]
  - `isGlobal` boolean

## Response `200`

Id of created role

- Role
  - `name` string
  - `permissions` Permissions[]
  - `scope` string

## Changes

- **2021-08-06** `e366ae458db2` — 1 warning, 1 info
  - removed the optional property `description` from the response with the `200` status
  - added the optional property `scope` to the response with the `200` status
- **2021-08-05** `bf593e163365` — 2 warning, 3 info
  - removed the request property `scope`
  - removed the optional property `scope` from the response with the `200` status
  - added the new optional request property `description`
  - added the new optional request property `isGlobal`
  - …1 more
- **2021-08-05** `c440d3b4a9b9` — 1 breaking, 3 info
  - the request's body type changed from no type to `object`
  - added the new optional request property `name`
  - added the new optional request property `permissions`
  - added the new optional request property `scope`
- **2019-08-15** `42619b8ccbbe` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/api/v1/roles/post.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/iam-api-for-oih/revisions/e366ae458db2/schema)
