---
title: "Remove a member from an enterprise."
method: DELETE
path: "/enterprises/{enterpriseId}/members/{userId}"
tags: ["enterprises"]
---

# Remove a member from an enterprise.

`DELETE /enterprises/{enterpriseId}/members/{userId}`

## Request

- Base URL: `https://api.shorebird.dev/api/v1`
- URL: `https://api.shorebird.dev/api/v1/enterprises/{enterpriseId}/members/{userId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Removes a leaver from every one of the enterprise's organizations and
every grant on a single app in them, revokes their pending
invitations into them, and revokes their sessions and API keys, so
they lose access at their next request. They can't sign in until an
owner or admin reactivates them (`PATCH` with `active: true`), which
gives none of that back. Their account and their access outside the
enterprise are left alone. Admins only, and
removing an owner, admin or billing manager is for owners only: an
admin gets a `403` (`enterprise_owner_required`).

A `409` refuses the caller themselves (`enterprise_member_is_self`),
someone already removed (`enterprise_member_already_removed`), an
owner of the enterprise, whom an owner makes an admin or member first
(`enterprise_member_is_owner`), and an owner of one of its
organizations (`enterprise_member_owns_organizations`).

## Response `200`

What removing them took.

- object: The memberships and app grants removing a person took.
  - `organizations` object[], required
    - `organization_id` integer, required
    - `organization_name` string, required
    - `role` 'owner' | 'admin' | 'appManager' | 'developer' | 'viewer' | 'auditor' | 'scim' | 'none', required: A role that a user can have relative to an Organization or App.
  - `app_grants` object[], required
    - `app_id` string, required
    - `organization_id` integer, required
    - `role` 'owner' | 'admin' | 'appManager' | 'developer' | 'viewer' | 'auditor' | 'scim' | 'none', required: A role that a user can have relative to an Organization or App.
  - `invitations_revoked` integer, required
  - `sessions_revoked` integer, required
  - `api_keys_revoked` integer, required

## Other responses

- `default`: Standard error response. Emitted for any non-2xx status where a body can be decoded into an [ErrorResponse].

## Changes

- **2026-11-05** `941da8871d10`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/changes/enterprises/:enterpriseId/members/:userId/delete.md)

---

[API](https://skmtc.dev/shorebird/apis/shorebird-codepush-api.md) - [All operations](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/revisions/941da8871d10?raw)
