agent-merge

Update Agent Merge configuration for a pull request

Changed on

Updates the Agent Merge configuration for a pull request, enabling Agent Merge or changing the allowed actions that Copilot is allowed to take on the pull request.

If Agent Merge is currently enabled for the pull request, only the user who most recently enabled it may change its allowed actions.

If enrollment eligibility cannot be determined, the operation returns 503.

This endpoint is only available to users with a Copilot subscription, excluding Copilot Free users. You must have write access to the repository, the pull request must not be from a fork or part of a stack, and the repository must have the "Allow automations" setting enabled.

OAuth app tokens and personal access tokens (classic) need the repo scope for private or internal repositories, or the public_repo scope for public repositories.

put/agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge

Request

  • Base URL
    https://api.github.com
  • URL
    https://api.github.com/agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge
  • Auth
    none declared

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository. The name is not case sensitive.

pull_numberinteger required
Example:42

The number that identifies the pull request.

Request body

allowed_actionsstring[] required

The set of actions that Copilot may perform on the pull request.

Example request

{
  "allowed_actions": [
    "fix_ci"
  ]
}

Response

Existing Agent Merge enrollment updated

allowed_actionsstring[] required

The set of actions which Copilot may perform on the pull request.

created_atstring date-time required

Timestamp when the pull request was enrolled for Agent Merge.

updated_atstring date-time required

Timestamp when the Agent Merge enrollment was last updated.

Example response

{
  "allowed_actions": [
    "fix_ci",
    "resolve_merge_conflicts"
  ],
  "created_at": "2026-09-09T12:00:00Z",
  "updated_at": "2026-09-09T12:00:00Z",
  "user": {
    "id": 9876
  }
}

Changes