---
title: "Get Copilot metrics for an organization"
method: GET
path: "/orgs/{org}/copilot/metrics"
tags: ["copilot"]
---

# Get Copilot metrics for an organization

`GET /orgs/{org}/copilot/metrics`

Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.

> [!NOTE]
> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.

The response contains metrics for up to 100 days prior. Metrics are processed once per day for the previous day,
and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
they must have telemetry enabled in their IDE.

To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.
Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.

OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint.

## Path parameters

- `org` string, required

## Query parameters

- `since` string
- `until` string
- `page` integer
- `per_page` integer

## Response `200`

Response

- CopilotUsageMetricsDay[]
  - `date` string, date, required — The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format.
  - `total_active_users` integer — The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint.
  - `total_engaged_users` integer — The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint.
  - `copilot_ide_code_completions` CopilotIdeCodeCompletions, nullable — Usage metrics for Copilot editor code completions in the IDE.
    - `total_engaged_users` integer — Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances.
    - `languages` object[] — Code completion metrics for active languages.
      - `name` string — Name of the language used for Copilot code completion suggestions.
      - `total_engaged_users` integer — Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances.
    - `editors` object[]
      - `name` string — Name of the given editor.
      - `total_engaged_users` integer — Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances.
      - `models` object[] — List of model metrics for custom models and the default model.
        - `name` string — Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'.
        - `is_custom_model` boolean — Indicates whether a model is custom or default.
        - `custom_model_training_date` string, nullable — The training date for the custom model.
        - `total_engaged_users` integer — Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances.
        - `languages` object[] — Code completion metrics for active languages, for the given editor.
          - `name` string — Name of the language used for Copilot code completion suggestions, for the given editor.
          - `total_engaged_users` integer — Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances.
          - `total_code_suggestions` integer — The number of Copilot code suggestions generated for the given editor, for the given language.
          - `total_code_acceptances` integer — The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances.
          - `total_code_lines_suggested` integer — The number of lines of code suggested by Copilot code completions for the given editor, for the given language.
          - `total_code_lines_accepted` integer — The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language.
  - `copilot_ide_chat` CopilotIdeChat, nullable — Usage metrics for Copilot Chat in the IDE.
    - `total_engaged_users` integer — Total number of users who prompted Copilot Chat in the IDE.
    - `editors` object[]
      - `name` string — Name of the given editor.
      - `total_engaged_users` integer — The number of users who prompted Copilot Chat in the specified editor.
      - `models` object[] — List of model metrics for custom models and the default model.
        - `name` string — Name of the model used for Copilot Chat. If the default model is used will appear as 'default'.
        - `is_custom_model` boolean — Indicates whether a model is custom or default.
        - `custom_model_training_date` string, nullable — The training date for the custom model.
        - `total_engaged_users` integer — The number of users who prompted Copilot Chat in the given editor and model.
        - `total_chats` integer — The total number of chats initiated by users in the given editor and model.
        - `total_chat_insertion_events` integer — The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor.
        - `total_chat_copy_events` integer — The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor.
  - `copilot_dotcom_chat` CopilotDotcomChat, nullable — Usage metrics for Copilot Chat in GitHub.com
    - `total_engaged_users` integer — Total number of users who prompted Copilot Chat on github.com at least once.
    - `models` object[] — List of model metrics for a custom models and the default model.
      - `name` string — Name of the model used for Copilot Chat. If the default model is used will appear as 'default'.
      - `is_custom_model` boolean — Indicates whether a model is custom or default.
      - `custom_model_training_date` string, nullable — The training date for the custom model (if applicable).
      - `total_engaged_users` integer — Total number of users who prompted Copilot Chat on github.com at least once for each model.
      - `total_chats` integer — Total number of chats initiated by users on github.com.
  - `copilot_dotcom_pull_requests` CopilotDotcomPullRequests, nullable — Usage metrics for Copilot for pull requests.
    - `total_engaged_users` integer — The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once.
    - `repositories` object[] — Repositories in which users used Copilot for Pull Requests to generate pull request summaries
      - `name` string — Repository name
      - `total_engaged_users` integer — The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository.
      - `models` object[] — List of model metrics for custom models and the default model.
        - `name` string — Name of the model used for Copilot pull request summaries. If the default model is used will appear as 'default'.
        - `is_custom_model` boolean — Indicates whether a model is custom or default.
        - `custom_model_training_date` string, nullable — The training date for the custom model.
        - `total_pr_summaries_created` integer — The number of pull request summaries generated using Copilot for Pull Requests in the given repository.
        - `total_engaged_users` integer — The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model.

## Other responses

- `403` — Forbidden
- `404` — Resource not found
- `422` — Copilot Usage Metrics API setting is disabled at the organization or enterprise level.
- `500` — Internal Error

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/rest/revisions/0fff3d4881a8/schema)
