---
title: "Authorize exactly one provider-managed auto-merge request"
method: POST
path: "/v1/automation-runs/{run_id}/actions/auto-merge/authorize"
tags: ["Automation"]
---

# Authorize exactly one provider-managed auto-merge request

`POST /v1/automation-runs/{run_id}/actions/auto-merge/authorize`

## Request

- Base URL: `https://api.agentry.sh`
- URL: `https://api.agentry.sh/v1/automation-runs/{run_id}/actions/auto-merge/authorize`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Only after trusted CI readiness proof for the exact ready PR. The server derives the immutable subject from that proof; the caller supplies no subject. It never grants direct merge, force merge, bypass, deploy, rollback, or direct push.

## Path parameters

- `run_id` string, required

## Headers

- `Idempotency-Key` string, required
- `X-Agentry-Lease-Token` string, required

## Request body

- object

## Response `200`

OK

- object
  - `grant_id` string, required
  - `action` 'auto_merge', required
  - `action_token` string, required
  - `subject_hash` string, required
  - `expires_at` integer, required
  - `idempotent_replay` boolean
  - `next_action` string, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/agentry/apis/agentry-api.md) · [All operations](https://skmtc.dev/agentry/apis/agentry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentry/apis/agentry-api/revisions/abdecddf009f?raw)
