Box Developer Documentation

Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Remove user from group

delete
https://api.box.com/2.0
/group_memberships/:group_membership_id

Deletes a specific group membership. Only admins of this group or users with admin-level permissions will be able to use this API.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
434534

The ID of the group membership.

Response

none

A blank response is returned if the membership was successfully deleted.

application/jsonClient error

An unexpected client error.

delete
Remove user from group
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE "https://api.box.com/2.0/group_memberships/434534" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.memberships.deleteGroupMembershipById(groupMembership.id!);
Python Gen
client.memberships.delete_group_membership_by_id(group_membership.id)
.NET Gen
await client.Memberships.DeleteGroupMembershipByIdAsync(groupMembershipId: NullableUtils.Unwrap(groupMembership.Id));
Swift Gen (Beta)
try await client.memberships.deleteGroupMembershipById(groupMembershipId: groupMembership.id!)
Java
BoxGroupMembership membership = new BoxGroupMembership(api, id);
membership.delete();
Python
membership_id = '1234'
client.group_membership(membership_id).delete() 
print('The membership was deleted!')
.NET
await client.GroupsManager.DeleteGroupMembershipAsync("33333");
Node
client.groups.removeMembership('33333')
	.then(() => {
		// removal succeeded — no value returned
	});
iOS
client.groups.deleteMembership(membershipId: "12345") { 
(result: Result<Void, BoxSDKError>) in
    guard case .success = result else {
        print("Error deleting group membership")
        return
    }

    print("Group Membership was successfully deleted.")
}