API - User Group Membership

Support Center > API Integration

Published 06/21/2019 at 7:25pm UTC

Page viewed 719 times

Details

How can I add and remove users from Groups?

Answer

Add a User to a Group

PUT https://api.securevideo.com/groupuser/12345

{
    "GroupId": 123
}

The above API call would add the user with the ID 12345 into the Group with the ID 123. If the user is already in the group, the call succeeds (the call is idempotent).

This method return HTTP 204 (No Content) if successful. In the event of an error will return HTTP 4xx or 5xx.

 

Remove a User from a Group

DELETE https://api.securevideo.com/groupuser/12345

{
    "GroupId": 123
}

The above API call would remove the user with the ID 12345 from the Group with the ID 123. If the user is not currently a member of the group, the call succeeds (the call is idempotent).

This method return HTTP 204 (No Content) if successful. In the event of an error will return HTTP 4xx or 5xx.