---
title: "Discard open draft"
method: DELETE
path: "/agent/{id}/branches/{branchId}/draft"
tags: ["Agent Versioning - Branches"]
---

# Discard open draft

`DELETE /agent/{id}/branches/{branchId}/draft`

Discard the open draft on this branch. Any unpublished edits are lost. The last committed revision remains the branch head.

## Path parameters

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

## Response `200`

Discarded.

- object
  - `status` boolean
  - `data` object
    - `discarded` boolean

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden access
- `404` — No open draft on this branch, or the branch does not exist.
- `500` — Internal server error

## Changes

> 49 revisions in range; 2 could not be searched.

- **2026-07-23** `a9c928635312` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/smallest-inc/apis/agent-management-api/changes/agent/:id/branches/:branchId/draft/delete.md)

---

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