---
title: "Discard a draft"
method: DELETE
path: "/agent/{id}/drafts/{draftId}"
tags: ["Agent Versioning - Drafts"]
---

# Discard a draft

`DELETE /agent/{id}/drafts/{draftId}`

Discard (soft-delete) a draft. Only the draft creator or an admin can discard.

## Path parameters

- `id` string, required
- `draftId` string, required

## Response `200`

Draft discarded successfully

- object
  - `status` boolean
  - `data` unknown

## Other responses

- `401` — Unauthorized access
- `403` — Forbidden. Returned in two cases: - The caller is not the draft creator or an org admin - The agent uses workflow_graph and the org lacks conversational agents access
- `404` — Agent or draft not found
- `500` — Internal server error

## Changes

- **2026-05-26** `5a6b4e19f353` — 1 warning, 2 info
  - removed the optional property `data` from the response with the `403` status
  - added the non-success response with the status `404`
  - added the optional property `errors` to the response with the `403` status
- **2026-04-20** `801f1d220d57` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/smallest-inc/apis/agent-management-api/changes/agent/:id/drafts/:draftId/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/ea4ea58d7c4e/schema)
