---
title: "Cancel in-flight publish"
method: POST
path: "/agent/{id}/branches/{branchId}/draft/publish/cancel"
tags: ["Agent Versioning - Branches"]
---

# Cancel in-flight publish

`POST /agent/{id}/branches/{branchId}/draft/publish/cancel`

Cancel a publish that is currently scanning. Idempotent. Returns `200` even if no scan is active.

## Path parameters

- `id` string, required
- `branchId` string, required

## Response `200`

Cancel processed.

- object
  - `status` boolean
  - `data` object
    - `cancelled` boolean

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden access
- `404` — Resource not found. The referenced ID does not exist or does not belong to the caller's organization.
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/c2d0eb64b01a/schema)
