---
title: "Delete membership"
method: POST
path: "/api/index/v1/deletemembership"
tags: ["Permissions"]
---

# Delete membership

`POST /api/index/v1/deletemembership`

Delete membership to a group in the specified datasource. Silently succeeds if membership is not present.

## Request body

- DeleteMembershipRequest — Describes the request body of the /deletemembership API call
  - `version` integer — Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done.
  - `datasource` string, required — The datasource for which the membership is removed
  - `membership` DatasourceMembershipDefinition, required — describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified.
    - `groupName` string, required — The group for which the membership is specified
    - `memberUserId` string — If the member is a user, then the email or datasource id for the user
    - `memberGroupName` string — If the member is a group, then the name of the member group

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `409` — Conflict

---

[API](https://skmtc.net/gleanwork/apis/glean-indexing-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-indexing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-indexing-api/versions/1c92beda1a4f/schema)
