User Groups
The User Groups API allows you to enroll or remove a user from a user group, and view the user groups they belong to.
A user group is typically used for subscriptions.
Get User's Groups - GET
Endpoint: /v1/users/{userId}/user-groups
Parameters:
userId
(path parameter, string)
Example response:
200
- OK
[
{
"id": "aGnOerO87e"
}
]
Error responses:
404
- User not found500
- Internal Server Error
Add User To User Group - POST
Endpoint: /v1/users/{userId}/user-groups/{groupId}
Parameters:
userId
(path parameter, string)groupId
(path parameter, string)
Example response:
204
- No Content (User was successfully added to user group)
Error responses:
400
- Bad request (user group invalid)404
- User not found500
- Internal Server Error
Remove User From User Group - DELETE
Endpoint: /v1/users/{userId}/user-groups/{groupId}
Parameters:
userId
(path parameter, string)groupId
(path parameter, string)
Example response:
204
- No Content (Removing user from user group was successful)
Error responses:
400
- Bad request (user group invalid)404
- User not found500
- Internal Server Error
Updated 3 months ago