Unpublish a post

Take a post off your blog or cancel a schedule with POST /posts/{id}/unpublish. The post is kept as a draft.

Takes a published post off your blog and turns it back into a draft. Also use this to cancel a scheduled post. The post isn't deleted, so you can publish it again later.

 

Request

Item Value
Method · path POST /posts/{id}/unpublish
Permission Full access (publish)

 

Request fields

None. Send it with no body.

 

Example

curl -X POST https://api-open.weekerp.com/blog/v1/posts/0193a1f2-7c4e-7b8a-9d10-3f2c1b0a9e87/unpublish \
  -H "Authorization: Bearer wk_live_xxxxxxxx"

 

Response

You get 200 with the post, and its status changes to draft.

 

Common errors

HTTP code Fix
403 api_key_scope_insufficient Send it with a full-access key
404 post_not_found Check the post ID. Posts on other blogs can't be found

For the full list of errors, see Error format in Publish posts with the blog API.

 

Next steps