# How do article drafts work?

Every article in Help.Center has two representations: the published version your
customers see, and a draft version that tracks in-progress edits. Understanding
this model makes the whole Articles API predictable.


DRAFT STATUSES

StatusMeaning unpublishedNever been published. Only a draft exists.
publishedPublished, and the draft is in sync with the live version.
published_with_changesPublished, but the draft has edits that differ from the
live version.

Editing the draft of a published article moves it to published_with_changes.
Publishing moves it back to published. Draft responses also carry a
has_unpublished_changes boolean and a preview_url for reviewing unpublished
content in the browser.


LIST AND FILTER DRAFTS

GET /v0/centers/:centerId/articles/drafts

Returns all drafts regardless of status. Filter with the same parameters as the
published list (search, category, pagination, expand[]=content) plus a status
filter:

# Articles with edits waiting to go live
curl -s -X GET \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/drafts?status=published_with_changes"

# Never-published drafts
curl -s -X GET \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/drafts?status=unpublished"

GET /articles/drafts/count returns the matching count for the same filters.


READ A SINGLE DRAFT

curl -s -X GET \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/draft?expand[]=content"

This returns the draft version of the article, including unpublished changes —
unlike GET /articles/:articleId, which returns only published content.


DISCARD DRAFT CHANGES

To throw away unpublished edits and restore the draft to match the live version:

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/draft/discard"

This returns 404 if the article has never been published — there is no published
version to restore from.


UNPUBLISH AN ARTICLE

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/unpublish"

Unpublishing removes the article from your live help center. The draft content
is preserved, so you can edit and republish later.

Please Note

> Unpublishing the root (default language) article also unpublishes all of its
> translations. Check the article's translations array before unpublishing if
> your center serves multiple languages.


ENDPOINT REFERENCE

ActionMethodEndpointScope List
draftsGET/v0/centers/:centerId/articles/draftscontent.read Count
draftsGET/v0/centers/:centerId/articles/drafts/countcontent.read Get
draftGET/v0/centers/:centerId/articles/:articleId/draftcontent.read Update
draftPATCH/v0/centers/:centerId/articles/:articleId/draftcontent.write Discard
draft
changesPOST/v0/centers/:centerId/articles/:articleId/draft/discardcontent.write
Unpublish
articlePOST/v0/centers/:centerId/articles/:articleId/unpublishcontent.publish


NEXT STEPS

 * How to create and publish help articles via API?
   [https://developers.help.center/article/1013-how-to-create-and-publish-help-articles-via-api]
 * How to manage article translations via API?
   [https://developers.help.center/article/1017-how-to-manage-article-translations-via-api]