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

Remove users from an organization's Copilot subscription

Cancels Copilot seat assignments for the organization members listed in selected_usernames. Their seats become pending cancellation, and members lose access at the end of the current billing cycle unless they retain access through team membership. Only organization owners can cancel seats for organization members.

1 parameter · 1 body field
orgstringrequired
The organization name. Matching is case-insensitive.

The usernames of organization members whose Copilot access is to be revoked.

selected_usernamesarray<string>required
The usernames of the organization members for which to revoke access to GitHub Copilot.

6 status codes
200Returns the total number of seats set to pending cancellation for the specified users in `seats_cancelled`.
seats_cancelledintegerrequired
401Returned when authentication is missing or invalid.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Returned when the authenticated user lacks permission or the required token scope to cancel Copilot seats for the organization.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the organization or another required resource is not found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when Copilot Business or Enterprise is not enabled, billing is not configured, a public code suggestions policy is not set, the seat management setting is enabled for all users or unconfigured, or a specified user's seat was assigned through a team.
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 lacks organization-owner access or the required token scope. A 404 is returned when the org path parameter does not identify an organization; a 422 indicates that the subscription, billing, seat management, or user-seat assignment does not meet cancellation requirements; a 500 indicates an internal error. selected_usernames must contain at least one username.