Skip to main content

Overview

The removeUserFromUserGroup mutation removes a member from one of your team’s user groups, identified by their email address. The requesting user must be a team admin.

Arguments

String
required
The unique identifier of the user group.
String
required
The email address of the user to remove from the group.

Usage Example

To remove a user from a user group, provide the group’s ID and the user’s email as arguments to the mutation. Here’s an example of how this mutation could be used:

Error Codes

List of possible error codes that may be returned by the removeUserFromUserGroup mutation. Full list of error codes can be found here.

The user group could not be found, no user matches the provided user_email, or the user is not a member of the group.

The provided user_email is not a valid email address.

The user does not have admin privileges to manage user groups.

You do not have access to this user group.

Audit Trail

A successful call records a USER_GROUP_MEMBER_REMOVED audit event carrying the group_id in its metadata, so membership changes are queryable after the fact.

Additional Resources

User Groups

Querying list of user groups

Add User to User Group

Adding a user to a user group