Sample - OpenAI API
POST/organization/groups/{group_id}/users

Add a user to a group

Adds a user to an organization group. Supply user_id in the request body together with the group_id of the group to update. A successful response confirms the object type and identifies both the added user and the group.

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

1 parameter · 1 body field
group_idstringrequired
The unique identifier of the group to add the user to.

Payload identifying the user to add to the group.

user_idstringrequired
Identifier of the user to add to the group.

2 status codes
200Returns a confirmation containing the `group.user` object type, the added user's identifier, and the group's identifier.
objectstringrequired
Always `group.user`.
Allowed:group.user
user_idstringrequired
Identifier of the user that was added.
group_idstringrequired
Identifier of the group the user was added to.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

user_id is required and must identify the user you want to add. group_id must identify the group you want to update. A 429 is returned when the request exceeds the applicable rate limit.