Skip to content
Primary navigation

Roles

List organization roles
client.Admin.Organization.Roles.List(ctx, query) (*NextCursorPage[Role], error)
GET/organization/roles
Create organization role
client.Admin.Organization.Roles.New(ctx, body) (*Role, error)
POST/organization/roles
Update organization role
client.Admin.Organization.Roles.Update(ctx, roleID, body) (*Role, error)
POST/organization/roles/{role_id}
Delete organization role
client.Admin.Organization.Roles.Delete(ctx, roleID) (*AdminOrganizationRoleDeleteResponse, error)
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
type Role struct{…}

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 []string

Permissions granted by the role.

PredefinedRole bool

Whether the role is predefined and managed by OpenAI.

ResourceType string

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