---
title: "Cancel only a scheduled post, with optional preview fencing"
method: POST
path: "/v1/posts/{id}/cancel"
tags: ["Posts"]
---

# Cancel only a scheduled post, with optional preview fencing

`POST /v1/posts/{id}/cancel`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/posts/{id}/cancel`
- Auth: `bearerAuth` (a scheme the document does not define)

Never retracts a published post. Preview with dryRun=true, then apply with the returned snapshot to fence all stored fields. Execution uses a full-post compare-and-swap even when a snapshot is omitted.

## Path parameters

- `id` string, required

## Request body

- object
  - `dryRun` boolean
  - `snapshot` string

## Response `200`

Preview snapshot or scheduled post cancelled

- object
  - `id` string, required
  - `cancelled` boolean, required
  - `dryRun` boolean
  - `snapshot` string

## Other responses

- `400`: Post is not scheduled or input is invalid. Nothing was retracted.
- `404`: Post not found
- `409`: Post changed or publishing started. Nothing cancelled.

---

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