Skip to content

Unpublish Blog Post​

POST
/api/v1/posts/{id}/unpublish

Authorizations​

SessionAuth

Session ID for authenticated requests

Type
API Key (header: X-Session-ID)

Parameters​

Path Parameters

id*
Type
string
Required

Responses​

Post moved to draft

Playground​

Server
Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Return a published blog post to draft.

Auth: session + owner/admin.

Parameters ​

NameInTypeRequiredDescription
idpathstringYesPost id

Request Body ​

Optional.

json
{}

Response 200 ​

json
{
	"data": { "id": "post_2", "status": "draft" },
	"user_context": { "authenticated": true },
	"meta": {}
}

Response Errors ​

  • 401 missing session
  • 403 not owner/admin
  • 404 post not found
  • 429 RATE_LIMIT_EXCEEDED

Notes ​

  • Rate limit: post bucket, 10 requests / 3600s by default. A session that can publish (admin, superadmin, author, editor, or the roles in BLOG_ALLOWED_POST_ROLES and BLOG_ADMIN_ROLES) is not counted. Otherwise 429 RATE_LIMIT_EXCEEDED. See Rate limits.

  • Use this to pull content back from public view.

  • Keeps the post editable without deleting it.