Skip to main content

Unpublish Post

POST/api/v1/dashboard/content/posts/{post_id}/unpublish

Overview

Reverts a published post back to draft status. The post will no longer be visible via the public content API. The published_at timestamp is cleared.

Authentication

info

Bearer authentication required - Pass your credentials as Authorization: Bearer <client_id>:<api_key>:<api_secret>.

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer <client_id>:<api_key>:<api_secret>

Path Parameters

ParameterTypeRequiredDescription
post_idstring (UUID)YesThe unique identifier of the post to unpublish

Request Body

No request body is required.

Response

Returns the full PostResponse object with status set to draft.

Example Request

curl -X POST "https://spideriq.ai/api/v1/dashboard/content/posts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unpublish" \
-H "Authorization: Bearer $CLIENT_TOKEN"

Example Response

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"slug": "getting-started-with-spideriq",
"title": "Getting Started with SpiderIQ",
"status": "draft",
"published_at": null,
"updated_at": "2026-04-08T13:00:00Z"
}

Status Codes

Status CodeMeaningDescription
200OKPost unpublished successfully
401UnauthorizedInvalid or missing Bearer token
404Not FoundPost not found or belongs to another client