Copilot チームのカスタマイズのための REST API エンドポイント
REST API を使用して、チームの Copilot カスタマイズを管理します。
チームのカスタマイズ Copilot について
Copilotカスタマイズ ドキュメントでは、組織チームのメンバーが使用できるプラグインとプラグイン マーケットプレースを定義します。 GitHub では、チームごとに 1 つのドキュメントが格納されます。 ドキュメントは、チームの Customize Copilot タブまたはこれらのエンドポイントで作成および管理できます。
カスタマイズ ドキュメントでは、次の最上位キーがサポートされています。
pluginAssignments:PLUGIN@MARKETPLACEによってキー指定された、チームが利用できるプラグイン。 各プラグインは既定で有効になっています。extraKnownMarketplaces: チームが利用できる追加のプラグイン マーケットプレース(マーケットプレース名でキー付け)。
次の要求と応答の例は、プラグインとそのマーケットプレースを示しています。
アクセス要件
認証されたユーザーは、組織の所有者またはチームのメンテナーである必要があります。 組織に割り当てられているエンタープライズ チーム (ID プロバイダー グループと同期されたものも含む) の場合、認証されたユーザーは組織の所有者である必要があります。 必要なスコープとアクセス許可は、これらのロール要件に加えてあります。
| トークンの種類 | カスタマイズ設定の読み取り | カスタマイズの置換または削除 |
|---|---|---|
| Personal access token (classic) または OAuth app トークン | read:org または admin:org スコープ | admin:org のスコープ |
| Fine-grained personal access tokenまたはGitHub Appユーザー アクセス トークン | 読み取りアクセス権を持つ Organization "Copilot エージェントの設定" アクセス許可 | 書き込みアクセス権を持つ Organization "Copilot エージェントの設定" アクセス許可 |
カスタマイズの作成と更新
チームのカスタマイズ ドキュメントを作成するには、JSON 要求本文として完全なドキュメントを PUT エンドポイントに送信します。 別のオブジェクトでラップしないでください。 要求が成功すると、送信したドキュメントとともに 200 OK が返されます。
PUT エンドポイントは、ドキュメント全体を置き換えます。 要求は既存のカスタマイズとマージされません。 要求から省略されたプラグインまたはマーケットプレースは、保存されているドキュメントから削除されます。
既存のドキュメントを編集するには:
GETエンドポイントを使用して、チームの現在のカスタマイズ ドキュメントを取得します。- 保持するすべてのプラグインとマーケットプレースを保持して、ドキュメントを編集します。
- 完全なドキュメントを
PUTエンドポイントに送信します。
置き換える前にドキュメントを読み取っても、要求間で別の編集を防ぐことはできません。
GET エンドポイントは、チームにドキュメントがない場合に404 Not Foundを返します。
404は、認証されたユーザーがそのチームにアクセスできないことを意味する場合もあります。
チームのカスタマイズ ドキュメントを削除するには、 DELETE エンドポイントを使用します。 ドキュメントが存在しない場合でも、 204 No Content を返します。 これにより、チームは削除されません。
無効なドキュメントは、理由と共に 422 Unprocessable Entity を返します。 同時編集により、書き込みまたは削除で 409 Conflict が返される可能性があります。
Get Copilot customizations for a team
Note
This endpoint is in public preview and is subject to change.
Gets the GitHub-managed Copilot customizations of a team.
The authenticated user must be an organization owner or a team maintainer. Teams that keep their
customizations in a repository return 409.
OAuth app tokens and personal access tokens (classic) need the admin:org or read:org scope to use this endpoint.
"Get Copilot customizations for a team" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Copilot agent settings" organization permissions (read)
"Get Copilot customizations for a team" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
team_slug string 必須The slug of the team name. |
"Get Copilot customizations for a team" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
409 | Conflict |
422 | Validation failed, or the endpoint has been spammed. |
500 | Internal Error |
503 | Service unavailable |
"Get Copilot customizations for a team" のコード サンプル
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/teams/TEAM_SLUG/copilot/customizationsResponse
Status: 200{
"pluginAssignments": {
"code-review@acme-marketplace": {
"state": "defaultEnabled"
}
},
"extraKnownMarketplaces": {
"acme-marketplace": {
"source": {
"source": "github",
"repo": "acme/copilot-marketplace"
}
}
}
}Set Copilot customizations for a team
Note
This endpoint is in public preview and is subject to change.
Replaces the GitHub-managed Copilot customizations of a team, creating them on the first write.
The authenticated user must be an organization owner or a team maintainer. Teams that keep their
customizations in a repository return 409. Documents that fail validation return 422 with the reason.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
"Set Copilot customizations for a team" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Copilot agent settings" organization permissions (write)
"Set Copilot customizations for a team" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
team_slug string 必須The slug of the team name. |
| 名前, タイプ, 説明 | |||||
|---|---|---|---|---|---|
pluginAssignments object Plugins assigned to the team, keyed by | |||||
Properties of |
| 名前, タイプ, 説明 | ||
|---|---|---|
key object A user-defined key to represent an item in | ||
Properties of |
| 名前, タイプ, 説明 |
|---|
state string The assignment state. 価値: |
extraKnownMarketplaces object Additional plugin marketplaces available to the team, keyed by marketplace name.
Properties of extraKnownMarketplaces
| 名前, タイプ, 説明 |
|---|
key object A user-defined key to represent an item in |
"Set Copilot customizations for a team" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
409 | Conflict |
422 | Validation failed, or the endpoint has been spammed. |
500 | Internal Error |
503 | Service unavailable |
"Set Copilot customizations for a team" のコード サンプル
要求の例
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/orgs/ORG/teams/TEAM_SLUG/copilot/customizations \
-d '{"pluginAssignments":{"code-review@acme-marketplace":{"state":"defaultEnabled"}},"extraKnownMarketplaces":{"acme-marketplace":{"source":{"source":"github","repo":"acme/copilot-marketplace"}}}}'Response
Status: 200{
"pluginAssignments": {
"code-review@acme-marketplace": {
"state": "defaultEnabled"
}
},
"extraKnownMarketplaces": {
"acme-marketplace": {
"source": {
"source": "github",
"repo": "acme/copilot-marketplace"
}
}
}
}Delete Copilot customizations for a team
Note
This endpoint is in public preview and is subject to change.
Deletes the GitHub-managed Copilot customizations of a team. Deleting customizations that don't exist succeeds.
The authenticated user must be an organization owner or a team maintainer. Teams that keep their
customizations in a repository return 409.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
"Delete Copilot customizations for a team" のきめ細かいアクセス トークン
このエンドポイントは、次の粒度の細かいトークンの種類で動作します:
粒度の細かいトークンには次のアクセス許可セットが設定されている必要があります:
- "Copilot agent settings" organization permissions (write)
"Delete Copilot customizations for a team" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
team_slug string 必須The slug of the team name. |
"Delete Copilot customizations for a team" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
204 | No Content |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
409 | Conflict |
422 | Validation failed, or the endpoint has been spammed. |
500 | Internal Error |
503 | Service unavailable |
"Delete Copilot customizations for a team" のコード サンプル
要求の例
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/teams/TEAM_SLUG/copilot/customizationsResponse
Status: 204