---
title: "Set the coding agent policy for an enterprise"
method: PUT
path: "/enterprises/{enterprise}/copilot/policies/coding_agent"
tags: ["copilot"]
---

# Set the coding agent policy for an enterprise

`PUT /enterprises/{enterprise}/copilot/policies/coding_agent`

Sets the policy for Copilot coding agent usage across an enterprise.

Enterprise owners can configure whether Copilot coding agent is enabled for all
organizations, disabled for all organizations, configured by individual organization
admins, or enabled for selected organizations only.

Only enterprise owners can set the coding agent policy for their enterprise.

OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:enterprise` scopes to use this endpoint.

## Path parameters

- `enterprise` string, required

## Request body

- object
  - `policy_state` 'enabled_for_all_orgs' | 'disabled_for_all_orgs' | 'enabled_for_selected_orgs' | 'configured_by_org_admins', required — The policy state for Copilot coding agent in the enterprise. Can be one of `enabled_for_all_orgs`, `disabled_for_all_orgs`, `enabled_for_selected_orgs`, or `configured_by_org_admins`.

## Response `204`

A header with no content is returned.

## Other responses

- `400` — Bad Request

## Changes

- **2026-04-14** (2022-11-28) `5694ed27ad1d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/github/apis/rest/changes/enterprises/:enterprise/copilot/policies/coding_agent/put.md)

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/rest/revisions/de37da78f522/schema)
