REST API endpoints for Copilot feature policy management
Use the REST API to manage Copilot feature policies for an organization.
Get feature policies for an organization
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 organization.
The enterprise default is used when the enterprise has set one. Otherwise, the organization's
own default is used, and an organization that has not enabled a default is reported as
disabled. For more information, see
About default availability.
Organization owners can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.
Organization SAML authorization and OAuth app access restrictions also apply.
Fine-grained access tokens for "Get feature policies for an organization"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Administration" organization permissions (write)
Parameters for "Get feature policies for an organization"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
HTTP response status codes for "Get feature policies for an organization"
| Status code | Description |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Code samples for "Get feature policies for an organization"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
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/copilot/feature-policiesOK
Status: 200{
"default_availability": {
"policy_state": "enabled",
"editable": true
}
}Update feature policies for an organization
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 organization.
An organization can only set its own default while its enterprise has not set one. For more information, see About default availability.
Changing this policy does not change any Copilot feature or client policy that has already been set.
Organization owners can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.
Organization SAML authorization and OAuth app access restrictions also apply.
Fine-grained access tokens for "Update feature policies for an organization"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Administration" organization permissions (write)
Parameters for "Update feature policies for an organization"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
| Name, Type, Description | ||
|---|---|---|
default_availability object Required | ||
Properties of |
| Name, Type, Description |
|---|
policy_state string RequiredThe organization default policy applied to newly released Copilot features and clients. Can be one of: |
HTTP response status codes for "Update feature policies for an organization"
| Status code | Description |
|---|---|
200 | OK |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Code samples for "Update feature policies for an organization"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
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/orgs/ORG/copilot/feature-policies \
-d '{"default_availability":{"policy_state":"enabled"}}'OK
Status: 200{
"default_availability": {
"policy_state": "enabled",
"editable": true
}
}