From 8c20590e869f1f4f64d39214ff56bfe109f3e3f4 Mon Sep 17 00:00:00 2001 From: Taylor Reis Date: Mon, 23 Nov 2026 16:51:32 +0000 Subject: [PATCH] Explain Copilot team customizations REST API usage (#64627) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Copilot-Session: 441e1304-4e6b-49ce-8ebc-b67fb646d4f6 Copilot-Session: 22b41849-154f-4705-89a5-780c205dde8d --- .../copilot/copilot-team-customizations.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/content/rest/copilot/copilot-team-customizations.md b/content/rest/copilot/copilot-team-customizations.md index 70f4817c66f4..3e294adf5ab5 100644 --- a/content/rest/copilot/copilot-team-customizations.md +++ b/content/rest/copilot/copilot-team-customizations.md @@ -11,4 +11,44 @@ category: - Use Copilot and AI services --- +## About {% data variables.product.prodname_copilot_short %} team customizations + +A {% data variables.product.prodname_copilot_short %} customization document defines the plugins and plugin marketplaces available to members of an organization team. {% data variables.product.github %} stores one document for each team. You can create and manage the document on the team's **Customize Copilot** tab, or with these endpoints. + +The customization document supports these top-level keys: + +* `pluginAssignments`: Plugins available to the team, keyed by `PLUGIN@MARKETPLACE`. Each plugin is enabled by default. +* `extraKnownMarketplaces`: Additional plugin marketplaces available to the team, keyed by marketplace name. + +The request and response examples below show a plugin and its marketplace. + +## Access requirements + +The authenticated user must be an organization owner or a maintainer of the team. For an enterprise team assigned to the organization, including one synced with an identity provider group, the authenticated user must be an organization owner. The required scopes and permissions are in addition to these role requirements. + +| Token type | Read customizations | Replace or delete customizations | +| --- | --- | --- | +| {% data variables.product.pat_v1_caps %} or {% data variables.product.prodname_oauth_app %} token | `read:org` or `admin:org` scope | `admin:org` scope | +| {% data variables.product.pat_v2_caps %} or {% data variables.product.prodname_github_app %} user access token | Organization "Copilot agent settings" permission with read access | Organization "Copilot agent settings" permission with write access | + +## Creating and updating customizations + +To create a team's customization document, send the complete document as the JSON request body to the `PUT` endpoint. Do not wrap it in another object. A successful request returns `200 OK` with the submitted document. + +The `PUT` endpoint replaces the entire document. It does not merge the request with existing customizations. Any plugin or marketplace omitted from the request is removed from the stored document. + +To edit an existing document: + +1. Get the team's current customization document using the `GET` endpoint. +1. Edit the document, retaining every plugin and marketplace you want to keep. +1. Send the complete document to the `PUT` endpoint. + +Reading a document before replacing it does not prevent another edit between requests. + +The `GET` endpoint returns `404 Not Found` when the team has no document. A `404` can also mean the team is not accessible to the authenticated user. + +To remove the team's customization document, use the `DELETE` endpoint. It returns `204 No Content` even if the document does not exist. This does not delete the team. + +Invalid documents return `422 Unprocessable Entity` with the reason. A concurrent edit can cause a write or delete to return `409 Conflict`. +