Sample - OpenAI API
POST/organization/users/{user_id}/roles

Assign organization role to user

Assigns an organization role to a user within the organization.

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

1 parameter · 1 body field
user_idstringrequired
The ID of the user that should receive the organization role.

Identifies the organization role to assign to the user.

role_idstringrequired
Identifier of the role to assign.

2 status codes
200Organization role assigned to the user successfully.
objectstringrequired
Always `user.role`.
Allowed:user.role
userobjectrequired
Represents an individual `user` within an organization.
roleobjectrequired
Details about a role that can be assigned through the public Roles API.
429The request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned: The request was rejected because a rate limit was exceeded.