---
title: "Remove enterprise teams from the Copilot subscription for an enterprise"
method: DELETE
path: "/enterprises/{enterprise}/copilot/billing/selected_enterprise_teams"
tags: ["copilot"]
---

# Remove enterprise teams from the Copilot subscription for an enterprise

`DELETE /enterprises/{enterprise}/copilot/billing/selected_enterprise_teams`

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Sets seats for all members of each enterprise team specified to "pending cancellation".
This will cause the members of the specified enterprise team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another enterprise team.

Only enterprise owners can cancel Copilot seats for their enterprise members.

The response contains the total number of seats set to "pending cancellation".

OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:enterprise` scopes to use this endpoint.

## Path parameters

- `enterprise` string, required

## Request body

- object
  - `selected_enterprise_teams` string[], required — List of enterprise team names within the enterprise to which to grant access to GitHub Copilot.

## Response `200`

OK

- object — The total number of seats set to "pending cancellation" for the members of the specified enterprise team(s).
  - `seats_cancelled` integer, required

## Other responses

- `202` — Response
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found
- `422` — Copilot Business is not enabled for this enterprise, billing has not been set up for this enterprise or a public code suggestions policy has not been set for this enterprise.
- `500` — Internal Error

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
