---
title: "Create a new role"
method: POST
path: "/v2/iam/roles"
tags: ["IAM"]
---

# Create a new role

`POST /v2/iam/roles`

You need the "Create, update, and delete roles in account" permission to use this endpoint.

## Request body

- IdentityRoleRequestBody
  - `description` string, required — Description of the role.
  - `name` string, required — Name of the role.
  - `permissions` integer[], required — List of user permission identifiers

## Response `201`

CREATED

- union
  - IdentityCustomRoleWithPermissionsResponse
    - `description` string, required — Description of the role.
    - `identifier` string, uuid, required — The unique identifier of the role.
    - `name` string, required — Name of the role.
    - `permissions` integer[], required — Role permission identifiers
    - `users_assigned_count` integer, required — Number of users assigned.
    - `account_identifier` string, uuid, required — The account identifier of the role.
    - `created_at` string, date-time, required — Date and time the role was last created.
    - `created_by` string, uuid — Created by identifier
    - `updated_at` string, date-time, required — Date and time the role was last updated.
    - `updated_by` string, uuid — Updated by identifier
  - IdentityDefaultRoleWithPermissionsResponse
    - `description` string, required — Description of the role.
    - `identifier` string, uuid, required — The unique identifier of the role.
    - `name` string, required — Name of the role.
    - `permissions` integer[], required — Role permission identifiers
    - `users_assigned_count` integer, required — Number of users assigned.

## Other responses

- `400` — Invalid input

---

[API](https://skmtc.dev/complyadvantage/apis/mesh-api.md) · [All operations](https://skmtc.dev/complyadvantage/apis/mesh-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/complyadvantage/mesh-api/revisions/fdaac4351d85/schema)
