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

Update an organization role

Updates an existing organization role. Supply any combination of permissions, description, and role_name to change the role attributes, including null values where permitted.

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

1 parameter · 3 body fields
role_idstringrequired
The identifier of the organization role to update.

Role update payload containing the attributes to change.

permissionsarray<string>optional
Updated set of permissions for the role.
descriptionstringoptional
New description for the role.
role_namestringoptional
New name for the role.

2 status codes
200Returns the updated 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 role to update, and each supplied field must be an array of permission strings, a string, or null according to its field definition.