Update Agent Merge configuration for a pull request
Changed onUpdates 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.
Request
- Base URLhttps://api.github.com
- URLhttps://api.github.com/agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge
- Authnone declared
Path parameters
The account owner of the repository. The name is not case sensitive.
The name of the repository. The name is not case sensitive.
The number that identifies the pull request.
Request body
Example request
{
"allowed_actions": [
"fix_ci"
]
}Response
Existing Agent Merge enrollment 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
- info
endpoint added
- info