v32

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-07-312881,4162.7 MB
Roles

Create project role

Creates a custom role for a project.

post/projects/{project_id}/roles

Path parameters

project_idstring required

The ID of the project to update.

Request body

role_namestring required

Unique name for the role.

permissionsstring[] required

Permissions to grant to the role.

descriptionstring nullable

Optional description of the role.

Response

Project role created successfully.

object'role' required

Always role.

idstring required

Identifier for the role.

namestring required

Unique name for the role.

descriptionstring nullable required

Optional description of the role.

permissionsstring[] required

Permissions granted by the role.

resource_typestring required

Resource type the role is bound to (for example api.organization or api.project).

predefined_roleboolean required

Whether the role is predefined and managed by OpenAI.