DELETE/orgs/{org}/copilot/billing/selected_teams

Remove teams from the Copilot subscription for an organization

Triggers cancellation of Copilot seats for users in the specified organization teams by setting those seats to pending cancellation. Supply selected_teams with at least one team name; only organization owners can cancel seats for organization members. Affected users lose Copilot access at the end of the current billing cycle unless they retain access through another team.

1 parameter · 1 body field
orgstringrequired
The organization name. The name is not case sensitive.

The teams whose members' Copilot seats will be set to pending cancellation.

selected_teamsarray<string>required
The names of teams from which to revoke access to GitHub Copilot.

6 status codes
200Returns the number of seats set to pending cancellation for members of the specified teams in `seats_cancelled`.
seats_cancelledintegerrequired
401Returned when the request is not authenticated.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Returned when the authenticated user is not authorized to cancel Copilot seats for the organization.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the organization resource is not found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when Copilot Business or Copilot Enterprise is not enabled, billing is not set up, the public code suggestions policy is not set, or the organization's Copilot access setting enables access for all users or is unconfigured.
500Returned when an internal error occurs.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 401 is returned when authentication is missing or invalid, and a 403 when the authenticated user is not authorized; only organization owners can cancel seats, and OAuth app tokens and classic personal access tokens need either manage_billing:copilot or admin:org. A 404 is returned when the organization resource is not found, and a 422 when the organization lacks a Copilot Business or Copilot Enterprise subscription, billing setup, or a configured public code suggestions policy, or when its Copilot access setting enables access for all users or is unconfigured. A 500 indicates an internal error. The org path parameter must identify the organization; selected_teams is required and must contain at least one team name.