---
title: "Record immutable provider-observed draft PR proof"
method: POST
path: "/v1/automation-runs/{run_id}/pr-proof"
tags: ["Automation"]
---

# Record immutable provider-observed draft PR proof

`POST /v1/automation-runs/{run_id}/pr-proof`

## Request

- Base URL: `https://api.agentry.sh`
- URL: `https://api.agentry.sh/v1/automation-runs/{run_id}/pr-proof`
- Auth: HTTP bearer

Trusted CI only. The proof must match the exact repository, branch, commit, diff, tests, and consumed pre-action grant.

## Path parameters

- `run_id` string, required

## Request body

- object
  - `vcs_provider` 'github' | 'gitlab' | 'bitbucket', required
  - `repository` string, uri, required: Absolute HTTPS URL without embedded username or password credentials.
  - `pr_url` string, uri, required: Absolute HTTPS URL without embedded username or password credentials.
  - `pr_number` integer, required
  - `draft` true, required
  - `head_sha` string, required
  - `head_branch` string, required
  - `base_branch` string, required
  - `change_types` string[], required
  - `changed_files` string[], required
  - `changed_lines` object, required
    - `added` integer, required
    - `deleted` integer, required
  - `tests` object[], required
    - `command` string, required
    - `status` 'passed' | 'failed' | 'skipped', required
    - `exit_code` integer
    - `duration_ms` integer
    - `output_excerpt` string
  - `ci_url` string, uri: Absolute HTTPS URL without embedded username or password credentials.

## Response `200`

OK

- object
  - `run_id` string, required
  - `proof_hash` string, required
  - `recorded_at` integer, required
  - `idempotent_replay` boolean, required
  - `next_action` string

## 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)
