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

Add teams to the Copilot subscription for an organization

Creates Copilot seats for users in the specified organization teams. Supply selected_teams with at least one team name; the organization must have a Copilot Business or Copilot Enterprise subscription and a configured public code suggestions policy. The organization is billed for each seat according to its Copilot plan.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

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

The teams to grant access to GitHub Copilot.

selected_teamsarray<string>required
List of team names within the organization to which to grant access to GitHub Copilot.

6 status codes
201Returns the number of seats created for members of the specified teams in `seats_created`.
seats_createdintegerrequired
401Returned when the request is not authenticated.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Returned when the authenticated user is not authorized to purchase 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 purchase 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.