---
title: "Create project role"
method: POST
path: "/projects/{project_id}/roles"
tags: ["Roles"]
---

# Create project role

`POST /projects/{project_id}/roles`

Creates a custom role for a project.

## Path parameters

- `project_id` string, required

## Request body

- PublicCreateOrganizationRoleBody — Request payload for creating a custom role.
  - `role_name` string, required — Unique name for the role.
  - `permissions` string[], required — Permissions to grant to the role.
  - `description` string, nullable — Optional description of the role.

## Response `200`

Project role created successfully.

- Role — Details about a role that can be assigned through the public Roles API.
  - `object` 'role', required — Always `role`.
  - `id` string, required — Identifier for the role.
  - `name` string, required — Unique name for the role.
  - `description` string, nullable, required — Optional description of the role.
  - `permissions` string[], required — Permissions granted by the role.
  - `resource_type` string, required — Resource type the role is bound to (for example `api.organization` or `api.project`).
  - `predefined_role` boolean, required — Whether the role is predefined and managed by OpenAI.

## Changes

- **2026-04-28** `fa32d6e7d961` — 1 info
  - the endpoint scheme security `AdminApiKeyAuth` was added to the API

[Change history](https://skmtc.dev/openai/apis/openai-api/changes/projects/:project_id/roles/post.md)

---

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