---
title: "Batch Create Project-Level Custom Roles"
method: POST
path: "/openapi/v2.0/manage/api/v1/organizations/{uuid}/roles"
tags: ["Organization & Project/Members & Permissions Management/Roles & Permissions"]
---

# Batch Create Project-Level Custom Roles

`POST /openapi/v2.0/manage/api/v1/organizations/{uuid}/roles`

## Request

- Base URL: `https://41b04hdzmc.apifox.cn` (the document declares no server; this is the origin it was published from)
- URL: `https://41b04hdzmc.apifox.cn/openapi/v2.0/manage/api/v1/organizations/{uuid}/roles`
- Auth: none required

Batch create roles under specified organization; currently only type=project is supported

## Path parameters

- `uuid` string, required

## Headers

- `x-user-token` string, required
- `X-Request-Id` string, uuid
- `X-Project-Uuid` string, required

## Request body

- object
  - `type` 'project': Role Type. project: Project Role
  - `roles` object[]: Role List to Create
    - `role_name` string, nullable, required: Role Name
    - `role_description` string, nullable, required: Role Description
    - `permissions` string[]: Permission ID List (corresponds to ID in InitPermission/RolesPermission)

## Response `200`

OK

- object
  - `code` integer, required: Business Status Code: 0=Success; non-zero=Error Code (see message for meaning)
  - `message` string: Error Description Message (Omitted on Success)
  - `data` unknown

## Other responses

- `500`: Service temporarily unavailable, please retry later

---

[API](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-on-premises.md) - [All operations](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-on-premises/llms.txt) - [OpenAPI document](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-on-premises/revisions/e4544b7809ea?raw)
