Skip to content
Primary navigation

Roles

List organization roles
client.admin.organization.roles.list(RoleListParams { after, limit, order } query?, RequestOptionsoptions?): NextCursorPage<Role { id, description, name, 4 more } >
GET/organization/roles
Create organization role
client.admin.organization.roles.create(RoleCreateParams { permissions, role_name, description } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/organization/roles
Update organization role
client.admin.organization.roles.update(stringroleID, RoleUpdateParams { description, permissions, role_name } body, RequestOptionsoptions?): Role { id, description, name, 4 more }
POST/organization/roles/{role_id}
Delete organization role
client.admin.organization.roles.delete(stringroleID, RequestOptionsoptions?): RoleDeleteResponse { id, deleted, object }
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
Role { id, description, name, 4 more }

Details about a role that can be assigned through the public Roles API.

id: string

Identifier for the role.

description: string | null

Optional description of the role.

name: string

Unique name for the role.

object: "role"

Always role.

permissions: Array<string>

Permissions granted by the role.

predefined_role: boolean

Whether the role is predefined and managed by OpenAI.

resource_type: string

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

RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: string

Identifier of the deleted role.

deleted: boolean

Whether the role was deleted.

object: "role.deleted"

Always role.deleted.