endpoints da API REST para controles de IA corporativa
Use a API REST para gerenciar Copilot políticas de modelo para sua empresa, equipes empresariais e aplicativos empresariais.
Get model policies for agent apps
Use this endpoint to retrieve Copilot model policies for agent apps. The response shows which model settings can be changed and which are controlled by enterprise policy.
For models whose settings can be changed, the response shows the configured
setting or optional if no setting has been configured. For models
controlled by enterprise policy, it shows the enterprise setting or the
applicable default. These settings do not necessarily determine whether
an individual user can access a model.
Enterprise owners and users with the read_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Get model policies for agent apps"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (read)
Parâmetros para "Get model policies for agent apps"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
Códigos de status de resposta HTTP para "Get model policies for agent apps"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
503 | Service unavailable |
Exemplos de código para "Get model policies for agent apps"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplos de solicitação
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/enterprises/ENTERPRISE/copilot/apps/model-policiesOK
Status: 200{
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "optional",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}Update model policies for enterprise apps
Use this endpoint to set Copilot model policies for agent apps. Set a
model to enabled to configure an apps policy, or to optional to remove
the stored apps policy for that model. Locked models cannot be updated.
Returns the apps policy state representation, including enterprise policy and editability. These states are not a final access decision for a user.
Enterprise owners and users with the write_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Update model policies for enterprise apps"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (write)
Parâmetros para "Update model policies for enterprise apps"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
| Nome, Tipo, Descrição | |||
|---|---|---|---|
models array of objects Obrigatório | |||
Properties of |
| Nome, Tipo, Descrição |
|---|
model_name string Obrigatório |
policy_state string ObrigatórioUse Pode ser um dos: |
Códigos de status de resposta HTTP para "Update model policies for enterprise apps"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service unavailable |
Exemplos de código para "Update model policies for enterprise apps"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
curl -L \
-X PATCH \
-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/apps/model-policies \
-d '{"models":[{"model_name":"gpt-5.6-sol","policy_state":"enabled"}]}'OK
Status: 200{
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "enabled",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}Get feature policies for an enterprise
Note
This endpoint is in public preview and is subject to change.
Use this endpoint to retrieve the Copilot default availability policy for new features and clients
for an enterprise. A policy state of delegate_to_organizations means each organization sets its
own default.
Enterprise owners and users with the read_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Get feature policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (read)
Parâmetros para "Get feature policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
Códigos de status de resposta HTTP para "Get feature policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Exemplos de código para "Get feature policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
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/enterprises/ENTERPRISE/copilot/feature-policiesOK
Status: 200{
"default_availability": {
"policy_state": "enabled"
}
}Update feature policies for an enterprise
Note
This endpoint is in public preview and is subject to change.
Use this endpoint to update the Copilot default availability policy for new features and clients
for an enterprise. Use delegate_to_organizations to let each organization set its own default.
Enterprises without organizations cannot use delegate_to_organizations.
Changing this policy does not change any Copilot feature or client policy that has already been set.
Enterprise owners and users with the write_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Update feature policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (write)
Parâmetros para "Update feature policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
| Nome, Tipo, Descrição | ||
|---|---|---|
default_availability object Obrigatório | ||
Properties of |
| Nome, Tipo, Descrição |
|---|
policy_state string ObrigatórioThe enterprise default policy applied to newly released Copilot features and clients. Pode ser um dos: |
Códigos de status de resposta HTTP para "Update feature policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Exemplos de código para "Update feature policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
curl -L \
-X PATCH \
-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/feature-policies \
-d '{"default_availability":{"policy_state":"enabled"}}'OK
Status: 200{
"default_availability": {
"policy_state": "enabled"
}
}Get Copilot Fusion model policies for an enterprise
Gets model policy states for the enterprise GitHub Copilot Fusion layer and the separately read enterprise-layer policies. Identifies which models the Copilot Fusion layer can edit based on the enterprise policy.
Editable models show the Copilot Fusion layer's configured value. When the Copilot Fusion layer has not set a value, they show enabled,
because Copilot Fusion only restricts models it explicitly disables.
Locked models show the enterprise's explicit value or the applied default availability for eligible models.
When the default availability is applied and delegated to organizations, models that follow it show enabled.
Models not supported by Copilot Fusion are omitted.
These states are not a final access decision for a user. An enabled Copilot Fusion policy does not grant access to a model
that the user's applicable model policies deny.
Enterprise owners and users with the read_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Get Copilot Fusion model policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (read)
Parâmetros para "Get Copilot Fusion model policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
Códigos de status de resposta HTTP para "Get Copilot Fusion model policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
503 | Service unavailable |
Exemplos de código para "Get Copilot Fusion model policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplos de solicitação
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/enterprises/ENTERPRISE/copilot/fusion/model-policiesExplicit Fusion disable under enterprise delegation
Status: 200{
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "disabled",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}Update Copilot Fusion model policies for an enterprise
Updates editable model policies for the enterprise GitHub Copilot Fusion layer.
enabled and disabled set a Copilot Fusion policy.
An enabled policy adds no Copilot Fusion restriction; it does not grant access to a model that the user's applicable model policies deny.
A disabled policy prevents Copilot Fusion from using that model.
Locked models and models not supported by Copilot Fusion cannot be updated. Models not supported by Copilot Fusion are omitted from the response.
Returns the Copilot Fusion policy state representation, including enterprise policy and editability. These states are not a final access decision for a user.
Enterprise owners and users with the write_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Update Copilot Fusion model policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (write)
Parâmetros para "Update Copilot Fusion model policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
| Nome, Tipo, Descrição | |||
|---|---|---|---|
models array of objects Obrigatório | |||
Properties of |
| Nome, Tipo, Descrição |
|---|
model_name string Obrigatório |
policy_state string ObrigatórioPode ser um dos: |
Códigos de status de resposta HTTP para "Update Copilot Fusion model policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service unavailable |
Exemplos de código para "Update Copilot Fusion model policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplos de solicitação
curl -L \
-X PATCH \
-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/fusion/model-policies \
-d '{"models":[{"model_name":"claude-sonnet-4","policy_state":"enabled"}]}'OK
Status: 200{
"models": [
{
"model_name": "claude-sonnet-4",
"display_name": "Anthropic Claude Sonnet 4",
"policy_state": "enabled",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}Get model policies for an enterprise
Use this endpoint to retrieve Copilot model policies for an enterprise.
For enterprises that manage Copilot through organizations, delegated models use the
policy state of delegate_to_organizations.
Enterprise owners and users with the read_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Get model policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (read)
Parâmetros para "Get model policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
Códigos de status de resposta HTTP para "Get model policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
503 | Service unavailable |
Exemplos de código para "Get model policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
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/enterprises/ENTERPRISE/copilot/model-policiesOK
Status: 200{
"default_availability": {
"policy_state": "enabled"
},
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "enabled"
}
]
}Update model policies for an enterprise
Use this endpoint to update Copilot model policies for an enterprise.
For enterprises that manage Copilot through organizations, use
delegate_to_organizations to delegate a model or default availability.
Enterprises without organizations cannot use delegate_to_organizations.
Enterprise owners and users with the write_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Update model policies for an enterprise"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (write)
Parâmetros para "Update model policies for an enterprise"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
| Nome, Tipo, Descrição | |||
|---|---|---|---|
default_availability object | |||
Properties of |
| Nome, Tipo, Descrição |
|---|
policy_state string Obrigatório
Pode ser um dos: |
models array of objects Properties of models
| Nome, Tipo, Descrição |
|---|
model_name string Obrigatório |
policy_state string Obrigatório
Pode ser um dos: |
Códigos de status de resposta HTTP para "Update model policies for an enterprise"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service unavailable |
Exemplos de código para "Update model policies for an enterprise"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
curl -L \
-X PATCH \
-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/model-policies \
-d '{"default_availability":{"policy_state":"enabled"},"models":[{"model_name":"gpt-5.6-sol","policy_state":"enabled"}]}'OK
Status: 200{
"default_availability": {
"policy_state": "enabled"
},
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "enabled"
}
]
}Get model policies for an enterprise team
Use this endpoint to retrieve Copilot model policy states for an enterprise team, along with the corresponding enterprise-level policies. The response shows which model policies the team can update based on enterprise policy and the available team policy controls.
For models the team can update, the response shows the team’s configured
value or optional if the team has not set one. For locked models, it shows
the enterprise’s explicit value or the applicable default availability for
eligible models. These states are not a final access decision for a user.
Enterprise owners and users with the read_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the read:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Get model policies for an enterprise team"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (read)
Parâmetros para "Get model policies for an enterprise team"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
team_id integer ObrigatórioThe unique identifier of the team. |
Códigos de status de resposta HTTP para "Get model policies for an enterprise team"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
503 | Service unavailable |
Exemplos de código para "Get model policies for an enterprise team"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplos de solicitação
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/enterprises/ENTERPRISE/teams/TEAM_ID/copilot/model-policiesOK
Status: 200{
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "optional",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}Update model policies for an enterprise team
Use this endpoint to update Copilot model policies for an enterprise team. Only editable model policies can be updated.
Set a model to enabled to configure a team policy, or to optional to clear
the team’s policy for that model. Locked models cannot be updated.
The response contains the same policy state information as the corresponding GET endpoint, including enterprise policies and whether each model policy can be updated. These states do not necessarily determine whether an individual user can access a model.
Enterprise owners and users with the write_enterprise_ai_controls permission can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Tokens de acesso granulares para "Update model policies for an enterprise team"
Este endpoint funciona com os seguintes tipos de token granulares:
O token refinado deve ter os seguintes conjuntos de permissões:
- "Enterprise AI controls" enterprise permissions (write)
Parâmetros para "Update model policies for an enterprise team"
| Nome, Tipo, Descrição |
|---|
accept string Setting to |
| Nome, Tipo, Descrição |
|---|
enterprise string ObrigatórioThe slug version of the enterprise name. |
team_id integer ObrigatórioThe unique identifier of the team. |
| Nome, Tipo, Descrição | |||
|---|---|---|---|
models array of objects Obrigatório | |||
Properties of |
| Nome, Tipo, Descrição |
|---|
model_name string Obrigatório |
policy_state string ObrigatórioUse Pode ser um dos: |
Códigos de status de resposta HTTP para "Update model policies for an enterprise team"
| Código de status | Descrição |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
503 | Service unavailable |
Exemplos de código para "Update model policies for an enterprise team"
Se você acessar GitHub em GHE.com, substitua api.github.com pelo subdomínio dedicado da sua empresa em api.SUBDOMAIN.ghe.com.
Exemplo de solicitação
curl -L \
-X PATCH \
-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/teams/TEAM_ID/copilot/model-policies \
-d '{"models":[{"model_name":"gpt-5.6-sol","policy_state":"enabled"}]}'OK
Status: 200{
"models": [
{
"model_name": "gpt-5.6-sol",
"display_name": "OpenAI GPT-5.6 Sol",
"policy_state": "enabled",
"enterprise_policy_state": "delegate_to_teams_and_apps",
"editable": true
}
]
}