---
title: "Remove a member or leave"
method: DELETE
path: "/v2/teamspaces/{teamspaceId}/members/{memberId}"
tags: ["Teamspace Admin"]
---

# Remove a member or leave

`DELETE /v2/teamspaces/{teamspaceId}/members/{memberId}`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/members/{memberId}`
- Auth: HTTP bearer

Owners and admins remove other members. Any member can remove themselves (leave). The owner cannot be removed.

## Response `200`

Member removed

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `removedUserId` string

## Other responses

- `400`: Bad Request - Invalid input parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - Insufficient permissions or plan restrictions
- `404`: Not Found - Resource doesn't exist
- `500`: Internal Server Error

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/members/:memberId/delete.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
