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

Add users to an organization's Copilot subscription

Creates Copilot seats for organization members listed in selected_usernames. Submit at least one username; the organization must have a Copilot Business or Copilot Enterprise subscription, billing configured, and a suggestion matching policy set. The organization is billed for each seat, and only organization owners can purchase seats.

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

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

The usernames of organization members to grant Copilot access to.

selected_usernamesarray<string>required
The usernames of the organization members to be granted access to GitHub Copilot.

6 status codes
201Returns the total number of seats created for the specified users in `seats_created`.
seats_createdintegerrequired
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 purchase 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, or the organization's Copilot access setting is enabled 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 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 organization’s Copilot subscription, billing, suggestion policy, or access setting does not meet the requirements; a 500 indicates an internal error. selected_usernames must contain at least one username.