Copilot クラウド エージェント管理用の REST API エンドポイント
REST API を使用して、 Copilot cloud agentの設定を管理します。
Set the coding agent policy for an enterprise
Sets the policy for Copilot cloud agent usage across an enterprise.
Enterprise owners can configure whether Copilot cloud agent is enabled for all organizations, disabled for all organizations, configured by individual organization admins, or enabled for selected organizations only.
Only enterprise owners can set the coding agent policy for their enterprise.
OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.
"Set the coding agent policy for an enterprise" のきめ細かいアクセス トークン
このエンドポイントは、GitHubアプリ ユーザー アクセス トークン、GitHub アプリ インストール アクセス トークン、またはきめ細かい個人用アクセス トークンでは機能しません。
"Set the coding agent policy for an enterprise" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. |
| 名前, タイプ, 説明 |
|---|
policy_state string 必須The policy state for Copilot cloud agent in the enterprise. Can be one of 次のいずれかにできます: |
"Set the coding agent policy for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
204 | A header with no content is returned. |
400 | Bad Request |
"Set the coding agent policy for an enterprise" のコード サンプル
要求の例
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/copilot/policies/coding_agent \
-d '{"policy_state":"enabled_for_all_orgs"}'A header with no content is returned.
Status: 204Add organizations to the enterprise coding agent policy
Enables Copilot cloud agent for the specified organizations within the enterprise.
The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.
Only organizations that have Copilot enabled and belong to the enterprise will be affected.
Only enterprise owners can add organizations to the coding agent policy.
OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.
"Add organizations to the enterprise coding agent policy" のきめ細かいアクセス トークン
このエンドポイントは、GitHubアプリ ユーザー アクセス トークン、GitHub アプリ インストール アクセス トークン、またはきめ細かい個人用アクセス トークンでは機能しません。
"Add organizations to the enterprise coding agent policy" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. |
| 名前, タイプ, 説明 | |||
|---|---|---|---|
organizations array of strings List of organization logins within the enterprise to enable Copilot cloud agent for. | |||
custom_properties array of objects List of custom property filters to match organizations. Organizations matching any of the specified property name/value pairs will be included. This is a one-time operation, setting the property on an organization in the future will not automatically update its coding agent policy. | |||
Properties of |
| 名前, タイプ, 説明 |
|---|
property_name string 必須The name of the custom property to filter by. |
values array of strings 必須The values of the custom property to match. |
"Add organizations to the enterprise coding agent policy" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
204 | A header with no content is returned. |
400 | Bad Request |
"Add organizations to the enterprise coding agent policy" のコード サンプル
要求の例
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/enterprises/ENTERPRISE/copilot/policies/coding_agent/organizations \
-d '{"organizations":["my-org-1","my-org-2"],"custom_properties":[{"property_name":"department","values":["engineering","security"]}]}'A header with no content is returned.
Status: 204Remove organizations from the enterprise coding agent policy
Disables Copilot cloud agent for the specified organizations within the enterprise.
The enterprise's coding agent policy must be set to enabled_for_selected_orgs before
using this endpoint. Organizations can be specified by login or matched via custom properties.
Only organizations that have Copilot enabled and belong to the enterprise will be affected.
Only enterprise owners can remove organizations from the coding agent policy.
OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:enterprise scopes to use this endpoint.
"Remove organizations from the enterprise coding agent policy" のきめ細かいアクセス トークン
このエンドポイントは、GitHubアプリ ユーザー アクセス トークン、GitHub アプリ インストール アクセス トークン、またはきめ細かい個人用アクセス トークンでは機能しません。
"Remove organizations from the enterprise coding agent policy" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. |
| 名前, タイプ, 説明 | |||
|---|---|---|---|
organizations array of strings List of organization logins within the enterprise to disable Copilot cloud agent for. | |||
custom_properties array of objects List of custom property filters to match organizations. Organizations matching any of the specified property name/value pairs will be included. This is a one-time operation, setting the property on an organization in the future will not automatically update its coding agent policy. | |||
Properties of |
| 名前, タイプ, 説明 |
|---|
property_name string 必須The name of the custom property to filter by. |
values array of strings 必須The values of the custom property to match. |
"Remove organizations from the enterprise coding agent policy" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
204 | A header with no content is returned. |
400 | Bad Request |