---
title: "Delete a post that never went out"
method: DELETE
path: "/posts/{id}"
---

# Delete a post that never went out

`DELETE /posts/{id}`

## Request

- Base URL: `https://xpost.to/api/v1`
- URL: `https://xpost.to/api/v1/posts/{id}`
- Auth: HTTP bearer

Remove a post permanently, along with its delivery records. An **agent key** may only delete posts an agent created, and only while they are `pending_approval`, `draft`, `rejected` or `failed` — this is how an assistant clears up drafts the person didn't want instead of leaving them in the approval queue. **A `scheduled` post is taken off the schedule instead of deleted**: the answer is 200 with `deleted: false, unscheduled: true` and the `status` it went back to (`pending_approval`, keeping its time for when it is approved again, or `draft`) — read `deleted` before reporting what happened. Anything published, or approved by a person, is refused (409) for agents and humans alike: those rows are the receipt of what went out.

## Path parameters

- `id` string, uuid, required

## Response `200`

Deleted — or, for a scheduled post, unscheduled; `deleted` says which

- object
  - `id` string, uuid, required
  - `deleted` boolean, required: false means the post still exists and came off the schedule instead
  - `unscheduled` boolean: Only on a scheduled post: true, and `deleted` is false
  - `status` 'pending_approval' | 'draft': Where an unscheduled post went back to
  - `message` string

## Other responses

- `401`: Missing or invalid API key
- `403`: Missing posts:write scope
- `404`: Post not found in this project
- `409`: This post can't be deleted in its current state
- `429`: Rate limited

---

[API](https://skmtc.dev/xpost/apis/xpost-api.md) · [All operations](https://skmtc.dev/xpost/apis/xpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xpost/apis/xpost-api/revisions/9f570fcfed6d?raw)
