REST API endpoints for Copilot team customizations
Use the REST API to manage Copilot customizations for a team.
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.
Jetons d'accès granulaires pour «Get Copilot customizations for a team»
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- jetons d’accès utilisateur de l’application GitHub
- jetons d’accès d’installation de l’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Copilot agent settings" organization permissions (read)
Paramètres pour «Get Copilot customizations for a team »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
team_slug string RequisThe slug of the team name. |
Codes d’état de réponse HTTP pour «Get Copilot customizations for a team »
| Code de statut | Description |
|---|---|
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 |
Exemples de code pour «Get Copilot customizations for a team »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
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.
Jetons d'accès granulaires pour «Set Copilot customizations for a team»
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- jetons d’accès utilisateur de l’application GitHub
- jetons d’accès d’installation de l’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Copilot agent settings" organization permissions (write)
Paramètres pour «Set Copilot customizations for a team »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
team_slug string RequisThe slug of the team name. |
| Nom, Type, Description | |||||
|---|---|---|---|---|---|
pluginAssignments object Plugins assigned to the team, keyed by | |||||
Properties of |
| Nom, Type, Description | ||
|---|---|---|
key object A user-defined key to represent an item in | ||
Properties of |
| Nom, Type, Description |
|---|
state string The assignment state. Valeur: |
extraKnownMarketplaces object Additional plugin marketplaces available to the team, keyed by marketplace name.
Properties of extraKnownMarketplaces
| Nom, Type, Description |
|---|
key object A user-defined key to represent an item in |
Codes d’état de réponse HTTP pour «Set Copilot customizations for a team »
| Code de statut | Description |
|---|---|
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 |
Exemples de code pour «Set Copilot customizations for a team »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
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.
Jetons d'accès granulaires pour «Delete Copilot customizations for a team»
Ce point de terminaison fonctionne avec les types de tokens à granularité fine suivants:
- jetons d’accès utilisateur de l’application GitHub
- jetons d’accès d’installation de l’application GitHub
- Tokens d’accès personnel à granularité fine
Le token à granularité fine doit disposer de l’ensemble d’autorisations suivant:
- "Copilot agent settings" organization permissions (write)
Paramètres pour «Delete Copilot customizations for a team »
| Nom, Type, Description |
|---|
accept string Setting to |
| Nom, Type, Description |
|---|
org string RequisThe organization name. The name is not case sensitive. |
team_slug string RequisThe slug of the team name. |
Codes d’état de réponse HTTP pour «Delete Copilot customizations for a team »
| Code de statut | Description |
|---|---|
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 |
Exemples de code pour «Delete Copilot customizations for a team »
Si vous accédez à GitHub à GHE.com, remplacez api.github.com par le sous-domaine dédié de votre entreprise à api.SUBDOMAIN.ghe.com.
Exemple de requête
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