---
title: "Delete draft"
method: POST
path: "/delete_draft"
tags: ["Write"]
---

# Delete draft

`POST /delete_draft`

## Request

- Base URL: `https://pdb.postpen.ai/functions/v1/agent-api`
- URL: `https://pdb.postpen.ai/functions/v1/agent-api/delete_draft`
- Auth: HTTP bearer

Permanently deletes an unpublished draft only (is_draft, not scheduled, not sent). Refused unless confirm is true. Scheduled and published posts cannot be deleted.

## Request body

- object
  - `id` string, required: Id of the draft, from list_posts status draft.
  - `confirm` boolean, required: Must be true. Deleting cannot be undone.

## Response `200`

Success. JSON object; never contains LinkedIn tokens.

- object

## Other responses

- `400`: Invalid input, or a confirm: true guard was not met.
- `401`: Missing or invalid API key.
- `402`: Plan limit reached (for example the Free plan's monthly post cap).
- `403`: Destination not allowed for this account or plan.

---

[API](https://skmtc.dev/postpen/apis/postpen-agent-api.md) · [All operations](https://skmtc.dev/postpen/apis/postpen-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postpen/apis/postpen-agent-api/revisions/2b07a2e1bfe7?raw)
