Endpoints to manage Copilot using the REST API.
29 endpoints tagged copilot, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day
Use this endpoint to retrieve download links for the Copilot enterprise usage metrics report for a specific day. The report provides comprehensive usage data for Copilot features across the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-28-day/latest
Use this endpoint to retrieve download links for the latest 28-day enterprise Copilot usage metrics report. The report provides comprehensive usage data for Copilot features across the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /enterprises/{enterprise}/copilot/metrics/reports/user-teams-1-day
Use this endpoint to retrieve download links for the Copilot enterprise user-teams report for a specific day. The report provides user-team join data for Copilot across the enterprise, with one entry per user-team pair.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /enterprises/{enterprise}/copilot/metrics/reports/users-1-day
Use this endpoint to retrieve download links for the Copilot user usage metrics report for a specific day. The report provides detailed user-level usage data and engagement metrics for Copilot features across the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /enterprises/{enterprise}/copilot/metrics/reports/users-28-day/latest
Use this endpoint to retrieve download links for the latest 28-day enterprise users Copilot usage metrics report. The report provides detailed user-level usage data and engagement metrics for Copilot features across the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /enterprises/{enterprise}/copilot/policies/coding_agent
Sets the policy for Copilot cloud agent usage across an enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | A header with no content is returned. | no |
| 400 | Bad Request | yes |
POST /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
Enables Copilot cloud agent for the specified organizations within the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | A header with no content is returned. | no |
| 400 | Bad Request | yes |
DELETE /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
Disables Copilot cloud agent for the specified organizations within the enterprise.
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | A header with no content is returned. | no |
| 400 | Bad Request | yes |
GET /orgs/{org}/copilot/billing
Gets information about an organization's Copilot subscription, including seat breakdown
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | There is a problem with your account's associated payment method. | no |
GET /orgs/{org}/copilot/billing/seats
Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/copilot/billing/selected_teams
Purchases a GitHub Copilot seat for all users within each specified team.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 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, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. | no |
DELETE /orgs/{org}/copilot/billing/selected_teams
Sets seats for all members of each team specified to "pending cancellation".
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 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, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. | no |
POST /orgs/{org}/copilot/billing/selected_users
Purchases a GitHub Copilot seat for each user specified.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 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, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. | no |
DELETE /orgs/{org}/copilot/billing/selected_users
Sets seats for all users specified to "pending cancellation".
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 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. | no |
GET /orgs/{org}/copilot/coding-agent/permissions
Gets information about which repositories in an organization have been enabled
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/copilot/coding-agent/permissions
Sets the policy for which repositories in an organization can use Copilot cloud agent.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/copilot/coding-agent/permissions/repositories
Lists the selected repositories that are enabled for Copilot cloud agent in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
PUT /orgs/{org}/copilot/coding-agent/permissions/repositories
Replaces the list of selected repositories that are enabled for Copilot cloud
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PUT /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
Adds a repository to the list of selected repositories enabled for Copilot
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
Removes a repository from the list of selected repositories enabled for Copilot
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content | no |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
GET /orgs/{org}/copilot/content_exclusion
Gets information about an organization's Copilot content exclusion path rules.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | OK | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/copilot/content_exclusion
Sets Copilot content exclusion path rules for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Success | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 413 | Payload Too Large | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/copilot/metrics/reports/organization-1-day
Use this endpoint to retrieve download links for the Copilot organization usage metrics report for a specific day. The report provides comprehensive usage data for Copilot features across the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 204 | A header with no content is returned. | no |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/copilot/metrics/reports/organization-28-day/latest
Use this endpoint to retrieve download links for the latest 28-day organization Copilot usage metrics report. The report provides comprehensive usage data for Copilot features across the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/copilot/metrics/reports/user-teams-1-day
Use this endpoint to retrieve download links for the Copilot organization user-teams report for a specific day. The report provides user-team join data for Copilot across the organization, with one entry per user-team pair.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 204 | A header with no content is returned. | no |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/copilot/metrics/reports/users-1-day
Use this endpoint to retrieve download links for the Copilot organization user usage metrics report for a specific day. The report provides detailed user-level usage data and engagement metrics for Copilot features across the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
day | query | yes | The day to request data for, in YYYY-MM-DD format. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 204 | A header with no content is returned. | no |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/copilot/metrics/reports/users-28-day/latest
Use this endpoint to retrieve download links for the latest 28-day organization users Copilot usage metrics report. The report provides detailed user-level usage data and engagement metrics for Copilot features across the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/members/{username}/copilot
Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | The user's GitHub Copilot seat details, including usage. | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation. | no |
GET /repos/{owner}/{repo}/copilot/cloud-agent/configuration
Gets the Copilot cloud agent configuration for a repository, including MCP server
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 500 | Internal Error | yes |
| 401 | Requires authentication | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |