Skip to content
Primary navigation

Roles

List organization roles
admin.organization.roles.list(**kwargs) -> NextCursorPage<Role { id, description, name, 4 more } >
GET/organization/roles
Create organization role
admin.organization.roles.create(**kwargs) -> Role { id, description, name, 4 more }
POST/organization/roles
Update organization role
admin.organization.roles.update(role_id, **kwargs) -> Role { id, description, name, 4 more }
POST/organization/roles/{role_id}
Delete organization role
admin.organization.roles.delete(role_id) -> RoleDeleteResponse { id, deleted, object }
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
class 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

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: bool

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).

class RoleDeleteResponse { id, deleted, object }

Confirmation payload returned after deleting a role.

id: String

Identifier of the deleted role.

deleted: bool

Whether the role was deleted.

object: :"role.deleted"

Always role.deleted.