provider copilot POST /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
@utdk/github /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
Add organizations to the enterprise coding agent policy
Enables Copilot cloud agent for the specified organizations within the enterprise. The enterprise's coding agent policy must be set to `enabled_for_selected_orgs` before using this endpoint. Organizations can be specified by login or matched via custom properties. Only organizations that have Copilot enabled and belong to the enterprise will be affected. Only enterprise owners can add organizations to the coding agent policy. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:enterprise` scopes to use this endpoint.
enterprise path required
The slug version of the enterprise name.
string

Try it

Authentication
Configure credentials for GitHub v3 REST API
copilot.addOrganizationsToEnterpriseCodingAgentPolicy
POST/enterprises/{enterprise}/copilot/policies/coding_agent/organizations
Enables Copilot cloud agent for the specified organizations within the enterprise. The enterprise's coding agent policy must be set to `enabled_for_selected_orgs` before using this endpoint. Organizations can be specified by login or matched via custom properties. Only organizations that have Copilot enabled and belong to the enterprise will be affected. Only enterprise owners can add organizations to the coding agent policy. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:enterprise` scopes to use this endpoint.

Parameters

required

The slug version of the enterprise name.

Input

List of organization logins within the enterprise to enable Copilot cloud agent for.

List of custom property filters to match organizations. Organizations matching any of the specified property name/value pairs will be included. This is a one-time operation, setting the property on an organization in the future will not automatically update its coding agent policy.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.copilot.addOrganizationsToEnterpriseCodingAgentPolicy()