v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
copilot

Get Copilot usage records for an enterprise

[!NOTE] This endpoint is in public preview and is subject to change.

Use this endpoint to retrieve Copilot agent session activity records for a specific enterprise. The endpoint provides comprehensive observability into Copilot session data across your enterprise.

The response includes detailed usage records aggregated and forwarded from all Copilot clients where your end users operate under enterprise-paid Copilot licenses. This includes cloud agents operating on github.com and data resident deployments on ghe.com, Copilot CLI, VS Code, Visual Studio, and partner IDEs such as those provided by JetBrains and Eclipse.

Only EMU (GHEC and GHEC with Data Residency) enterprise owners can access this endpoint.

OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.

get/enterprises/{enterprise}/copilot/usage-records

Path parameters

enterprisestring required

The slug version of the enterprise name.

Query parameters

phrasestring

A search phrase to filter usage records. Supported qualifiers: type (request/response), user_id, created.

per_pageinteger

The number of results per page (max 25). Values are clamped to the range [1, 25].

afterstring

A cursor, as given in the Link header. If specified, the query only searches for events after this cursor.

beforestring

A cursor, as given in the Link header. If specified, the query only searches for events before this cursor.

order'desc' | 'asc'

The order of audit log events. To list newest events first, specify desc. To list oldest events first, specify asc.

The default is desc.

Response

Response

typestring

The record type (request or response).

user_idinteger

The ID of the user who made the request.

enterprise_idinteger

The ID of the enterprise.

github_request_idstring

The GitHub request ID.

endpointstring

The API endpoint called.

bodystring

The request or response body.

@timestampinteger

Milliseconds since Unix epoch.

event_idstring

The source-assigned event ID.