Skip to content
Primary navigation

Roles

List organization roles
admin.organization.roles.list(RoleListParams**kwargs) -> SyncNextCursorPage[Role]
GET/organization/roles
Create organization role
admin.organization.roles.create(RoleCreateParams**kwargs) -> Role
POST/organization/roles
Update organization role
admin.organization.roles.update(strrole_id, RoleUpdateParams**kwargs) -> Role
POST/organization/roles/{role_id}
Delete organization role
admin.organization.roles.delete(strrole_id) -> RoleDeleteResponse
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
class Role:

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

id: str

Identifier for the role.

description: Optional[str]

Optional description of the role.

name: str

Unique name for the role.

object: Literal["role"]

Always role.

permissions: List[str]

Permissions granted by the role.

predefined_role: bool

Whether the role is predefined and managed by OpenAI.

resource_type: str

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

class RoleDeleteResponse:

Confirmation payload returned after deleting a role.

id: str

Identifier of the deleted role.

deleted: bool

Whether the role was deleted.

object: Literal["role.deleted"]

Always role.deleted.