User management API - POST user groups
Adds a user to groups. Any existing group membership remains unaffected.
The request consumes an
To execute this request, you need the Allow write access for identity resources (users and groups) (
account-idm-write) scope assigned to your token. To learn how to obtain and use it, see Authentication.
The ID of the required account.
You can find the UUID on the Account > Account management API page, during creation of an OAuth client.
The email address of the required user.
The body of the request. Contains a list of groups (specified by UUIDs) to which the user is to be added.
Any existing group membership remains unaffected.
Request body objects
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
Success. The user has been added to the groups. Response doesn't have a body.
In this example, the request adds the user with the email@example.com email address to the group with the UUID of b794097-8ad2-4b32-b923-0131da2eeddf. The response code of 201 indicates that the modification has been successful.
1curl --request POST \2 --url 'https://firstname.lastname@example.org' \3 --header 'Authorization: Bearer abcdefjhij1234567890' \4 --header 'Content-Type: application/json' \5 --data '6 [7 "b794097-8ad2-4b32-b923-0131da2eeddf"8 ]9'