---
title: "Remove a user from the organization"
method: DELETE
path: "/api/ee/user"
tags: ["Enterprise (EE)"]
---

# Remove a user from the organization

`DELETE /api/ee/user`

Removes a user from the organization, revoking their access and their sessions. Only organization owners can access this endpoint.

## Query parameters

- `userId` string, required — The ID of the user to remove.

## Response `200`

User removed successfully.

- PublicEeDeleteUserResponse
  - `success` boolean, required
  - `message` string, required

## Other responses

- `400` — Missing userId parameter.
- `403` — Insufficient permissions, the last active owner cannot be removed, or SCIM provisioning is enabled (membership is managed through your identity provider).
- `404` — User is not a member of this organization.
- `500` — Unexpected failure.

---

[API](https://skmtc.dev/sourcebot/apis/sourcebot-public-api.md) · [All operations](https://skmtc.dev/sourcebot/apis/sourcebot-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sourcebot/sourcebot-public-api/revisions/b0ed96fb7103/schema)
