---
title: "DELETE /v1/spaces/{spacesId}/members/{membersId}"
method: DELETE
path: "/v1/spaces/{spacesId}/members/{membersId}"
tags: ["spaces"]
---

# DELETE /v1/spaces/{spacesId}/members/{membersId}

`DELETE /v1/spaces/{spacesId}/members/{membersId}`

## Request

- Base URL: `https://chat.googleapis.com`
- URL: `https://chat.googleapis.com/v1/spaces/{spacesId}/members/{membersId}`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/chat.admin.memberships`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.admin.memberships`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/chat.app.memberships`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.app.memberships`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/chat.import`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.import`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/chat.memberships`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.memberships`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/chat.memberships.app`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.memberships.app`

Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) and the authorization scope: - `https://www.googleapis.com/auth/chat.app.memberships` - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.memberships` - `https://www.googleapis.com/auth/chat.memberships.app` (to remove the calling app from the space) - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and the following authorization scope is used: - `https://www.googleapis.com/auth/chat.admin.memberships` App authentication is not supported for the following use cases: - Removing a Google Group from a space. - Removing a Chat app from a space. To delete memberships for space managers, the requester must be a space manager. If you're using [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) the Chat app must be the space creator.

## Path parameters

- `spacesId` string, required
- `membersId` string, required

## Query parameters

- `useAdminAccess` boolean

## Response `200`

Successful response

- Membership: Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
  - `affiliation` 'AFFILIATION_UNSPECIFIED' | 'INTERNAL' | 'EXTERNAL' | 'MANAGED_EXTERNAL': Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is `EXTERNAL`.
  - `createTime` string, google-datetime: Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.
  - `deleteTime` string, google-datetime: Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.
  - `groupMember` Group: A Google Group in Google Chat.
    - `name` string: Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}
  - `member` User: If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource (such as in the Messages and Memberships APIs) only populates the `name` and `type` fields for both internal and external users, unless they are members of the space or have prior affinity with the calling user.
    - `avatarUrl` string: Output only. The user's avatar image URL. When calling the Messages and Memberships APIs with [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), this field is populated for both internal and external users for the `sender` of a message, users within `annotations` (such as user mentions), and within `Membership` resources, provided the user is a member of the space or has prior affinity with the calling user.
    - `displayName` string: Output only. The user's display name. Populated for both app authentication and user authentication. This field is always populated for requests made with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). When calling the Messages and Memberships APIs with [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), this field is populated for both internal and external users for the `sender` of a message, users within `annotations` (such as user mentions), and within `Membership` resources, provided the user is a member of the space or has prior affinity with the calling user.
    - `domainId` string: Unique identifier of the user's Google Workspace domain.
    - `email` string: Output only. The user's email address. When calling the Messages and Memberships APIs with [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), this field is populated for both internal and external users for the `sender` of a message, users within `annotations` (such as user mentions), and within `Membership` resources, provided the user is a member of the space or has prior affinity with the calling user.
    - `isAnonymous` boolean: Output only. When `true`, the user is deleted or their profile is not visible, such as when a user is mentioned in a space without being a member and without prior affinity with the calling user.
    - `name` string: Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias for `{user}` in API requests. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API.
    - `type` 'TYPE_UNSPECIFIED' | 'HUMAN' | 'BOT': User type.
  - `name` string: Identifier. Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`
  - `role` 'MEMBERSHIP_ROLE_UNSPECIFIED' | 'ROLE_MEMBER' | 'ROLE_MANAGER' | 'ROLE_ASSISTANT_MANAGER': Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`.
  - `state` 'MEMBERSHIP_STATE_UNSPECIFIED' | 'JOINED' | 'INVITED' | 'NOT_A_MEMBER': Output only. State of the membership.

## Changes

- **2026-11-02** `ffee5784d4b1`: 4 info
  - the security scope `https://www.googleapis.com/auth/chat.admin.memberships` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/chat.admin.memberships` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/chat.memberships.app` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/chat.memberships.app` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/chat/changes/v1/spaces/:spacesId/members/:membersId/delete.md)

---

[API](https://skmtc.dev/google/apis/chat.md) - [All operations](https://skmtc.dev/google/apis/chat/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/chat/revisions/ffee5784d4b1?raw)
