Skip to content
Primary navigation

Roles

List organization roles
RoleListPage admin().organization().roles().list(RoleListParamsparams = RoleListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/roles
Create organization role
Role admin().organization().roles().create(RoleCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/roles
Retrieve organization role
Role admin().organization().roles().retrieve(RoleRetrieveParamsparams = RoleRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/organization/roles/{role_id}
Update organization role
Role admin().organization().roles().update(RoleUpdateParamsparams = RoleUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/roles/{role_id}
Delete organization role
RoleDeleteResponse admin().organization().roles().delete(RoleDeleteParamsparams = RoleDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/organization/roles/{role_id}
ModelsExpand Collapse
class Role:

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

String id

Identifier for the role.

Optional<String> description

Optional description of the role.

String name

Unique name for the role.

JsonValue; object_ "role"constant"role"constant

Always role.

List<String> permissions

Permissions granted by the role.

boolean predefinedRole

Whether the role is predefined and managed by OpenAI.

String resourceType

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