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

---

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