v56

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

Set the source organization for custom agents in an enterprise

Sets an organization as the source for custom agent definitions and Copilot CLI client settings in the enterprise. The organization must have a .github-private repository containing agent definitions.

By default, this endpoint also creates an enterprise-level ruleset to protect agent definition files (agents/.md and .github/agents/.md). You can opt out of ruleset creation by setting create_ruleset to false.

Enterprise owners with write access to AI Controls can use this endpoint.

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

put/enterprises/{enterprise}/copilot/custom-agents/source

Path parameters

enterprisestring required

The slug version of the enterprise name.

Request body

organization_idinteger required

The ID of the organization to use as the custom agents source.

create_rulesetboolean

Whether to create a ruleset to protect agent definition files. Defaults to true.

Response

Success