Publish and Revert Post Drafts

Learn how to publish draft posts and revert published posts to drafts.

When we create a blog post, it is published and publicly available by default. However, we can take down the publicly available posts and revert them to drafts. Draft posts are not visible to public users. Similarly, we can publish draft posts to make them publicly available.

Methods

In this lesson, we'll learn how to revert a published post to a draft state to revoke public access. We'll also learn how to publish a draft post to make it publicly available.

Revert a post to draft state

We can revert a published post to a draft state by making a POST request to the following URL:

Get hands-on with 1200+ tech skills courses.