---
title: "Update a patch record"
method: POST
path: "/api/v2/agent/updatePatch"
tags: ["Agent"]
---

# Update a patch record

`POST /api/v2/agent/updatePatch`

## Request

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

Update an existing patch record with a PR link or pull request status. Use this after creating a PR externally to link it back to the patch.

## Request body

- AgentUpdatePatchRequest
  - `organizationId` string: Organization ID (injected by MCP server)
  - `patchId` string, uuid, required: ID of the patch to update
  - `prLink` string: URL of the created pull request
  - `pullRequestStatus` 'PENDING' | 'ACCEPTED' | 'DENIED': Status of the pull request

## Response `200`

Patch record updated

- AgentUpdatePatchResponse
  - `patch` object, required
    - `id` string, uuid, required
    - `prLink` string, nullable, required
    - `pullRequestStatus` 'PENDING' | 'ACCEPTED' | 'DENIED' | 'null', nullable, required

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