---
title: "Remove users from the Copilot subscription for an organization"
method: DELETE
path: "/orgs/{org}/copilot/billing/selected_users"
tags: ["copilot"]
---

# Remove users from the Copilot subscription for an organization

`DELETE /orgs/{org}/copilot/billing/selected_users`

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

Sets seats for all users specified to "pending cancellation".
This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.
For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."

Only organization owners can cancel Copilot seats for their organization 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:org` scopes to use this endpoint.

## Path parameters

- `org` string, required

## Request body

- object
  - `selected_usernames` string[], required — The usernames of the organization members for which to revoke access to GitHub Copilot.

## Response `200`

OK

- object — The total number of seats set to "pending cancellation" for the specified users.
  - `seats_cancelled` integer, required

## Other responses

- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found
- `422` — Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team.
- `500` — Internal Error

---

[API](https://skmtc.net/github/apis/ghec.md) · [All operations](https://skmtc.net/github/apis/ghec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/ghec/revisions/8ae6d0c8716e/schema)
