---
title: "Take a published post off the site"
method: POST
path: "/posts/{id}/unpublish"
tags: ["Authoring"]
---

# Take a published post off the site

`POST /posts/{id}/unpublish`

## Request

- Base URL: `https://api.sweetvaluelab.com`
- URL: `https://api.sweetvaluelab.com/posts/{id}/unpublish`
- Auth: HTTP bearer

The post leaves the site at once and goes back to `draft`, where it can be edited and submitted again. Links to it answer 404 until then. An open revision of it is discarded.

## Other responses

- `400`: `bad_request`: the id is not an integer.
- `401`: No credential, or a token that is unknown, revoked or expired. The response carries `WWW-Authenticate: Bearer realm="sweetvaluelab"`; `error.code` is `unauthenticated`.
- `404`: `not_found`: no post with that id on this account (a deleted post is gone).
- `409`: `not_allowed`: the post is in a state this action does not start from; `error.message` says which.

---

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