---
title: "Submit a patch for PR creation"
method: POST
path: "/api/v2/agent/triggerPrFromPatch"
tags: ["Agent"]
---

# Submit a patch for PR creation

`POST /api/v2/agent/triggerPrFromPatch`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/agent/triggerPrFromPatch`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Mark a patch as confirmed so the platform PR service picks it up and creates a pull request with proper formatting. If the patch already has a PR, returns the existing PR link.

## Request body

- AgentTriggerPrFromPatchRequest
  - `organizationId` string: Organization ID (injected by MCP server)
  - `patchId` string, uuid, required: ID of the patch to submit for PR creation

## Response `200`

Patch submitted or already submitted

- AgentTriggerPrFromPatchResponse
  - `status` 'submitted' | 'already_submitted', required: Whether the patch was newly submitted or already had a PR. If already_submitted, prLink is returned.
  - `patchId` string, uuid
  - `prLink` string, nullable
  - `pullRequestStatus` 'PENDING' | 'ACCEPTED' | 'DENIED' | 'null', nullable
  - `message` string

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response

---

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