REST-API-Endpunkte für Copilot Teamanpassungen
Verwenden Sie die REST-API, um Copilot benutzerdefinierte Anpassungen für ein Team zu verwalten.
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.
Feinkörnige Zugriffstoken für "Get Copilot customizations for a team"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub App-Benutzerzugriffstoken
- GitHub-App-Installations-Zugriffstoken
- Feingranulare persönliche Zugriffstoken
Das differenzierte Token muss über den folgenden Berechtigungssatz verfügen.:
- "Copilot agent settings" organization permissions (read)
Parameter für "Get Copilot customizations for a team"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
HTTP-Antwortstatuscodes für "Get Copilot customizations for a team"
| Statuscode | BESCHREIBUNG |
|---|---|
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 |
Codebeispiele für "Get Copilot customizations for a team"
Wenn Sie bei GHE.com auf GitHub zugreifen, ersetzen Sie api.github.com durch die dedizierte Unterdomäne Ihres Unternehmens unter api.SUBDOMAIN.ghe.com.
Anforderungsbeispiel
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.
Feinkörnige Zugriffstoken für "Set Copilot customizations for a team"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub App-Benutzerzugriffstoken
- GitHub-App-Installations-Zugriffstoken
- Feingranulare persönliche Zugriffstoken
Das differenzierte Token muss über den folgenden Berechtigungssatz verfügen.:
- "Copilot agent settings" organization permissions (write)
Parameter für "Set Copilot customizations for a team"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
| Name, Typ, BESCHREIBUNG | |||||
|---|---|---|---|---|---|
pluginAssignments object Plugins assigned to the team, keyed by | |||||
Properties of |
| Name, Typ, BESCHREIBUNG | ||
|---|---|---|
key object A user-defined key to represent an item in | ||
Properties of |
| Name, Typ, BESCHREIBUNG |
|---|
state string The assignment state. Wert: |
extraKnownMarketplaces object Additional plugin marketplaces available to the team, keyed by marketplace name.
Properties of extraKnownMarketplaces
| Name, Typ, BESCHREIBUNG |
|---|
key object A user-defined key to represent an item in |
HTTP-Antwortstatuscodes für "Set Copilot customizations for a team"
| Statuscode | BESCHREIBUNG |
|---|---|
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 |
Codebeispiele für "Set Copilot customizations for a team"
Wenn Sie bei GHE.com auf GitHub zugreifen, ersetzen Sie api.github.com durch die dedizierte Unterdomäne Ihres Unternehmens unter api.SUBDOMAIN.ghe.com.
Anforderungsbeispiel
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.
Feinkörnige Zugriffstoken für "Delete Copilot customizations for a team"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub App-Benutzerzugriffstoken
- GitHub-App-Installations-Zugriffstoken
- Feingranulare persönliche Zugriffstoken
Das differenzierte Token muss über den folgenden Berechtigungssatz verfügen.:
- "Copilot agent settings" organization permissions (write)
Parameter für "Delete Copilot customizations for a team"
| Name, Typ, BESCHREIBUNG |
|---|
accept string Setting to |
| Name, Typ, BESCHREIBUNG |
|---|
org string ErforderlichThe organization name. The name is not case sensitive. |
team_slug string ErforderlichThe slug of the team name. |
HTTP-Antwortstatuscodes für "Delete Copilot customizations for a team"
| Statuscode | BESCHREIBUNG |
|---|---|
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 |
Codebeispiele für "Delete Copilot customizations for a team"
Wenn Sie bei GHE.com auf GitHub zugreifen, ersetzen Sie api.github.com durch die dedizierte Unterdomäne Ihres Unternehmens unter api.SUBDOMAIN.ghe.com.
Anforderungsbeispiel
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