Sample - OpenAI API
GET/organization/roles/{role_id}

Retrieve an organization role

Retrieves an organization role by its identifier. Use role_id to obtain the role's name, description, permissions, resource type, and predefined-role status.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
role_idstringrequired
The identifier of the organization role to retrieve.

2 status codes
200Returns the organization role with its identifier, name, description, permissions, resource type, and predefined-role status.
objectstringrequired
Always `role`.
Allowed:role
idstringrequired
Identifier for the role.
namestringrequired
Unique name for the role.
descriptionstringrequired
Optional description of the role.
permissionsarray<string>required
Permissions granted by the role.
resource_typestringrequired
Resource type the role is bound to (for example `api.organization` or `api.project`).
predefined_rolebooleanrequired
Whether the role is predefined and managed by OpenAI.
429Returned when the request was rejected because the rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request exceeds the rate limit. role_id must identify the organization role you want to retrieve.