How do article drafts work?

Markdown

View as Markdown

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

Related Articles

Was this article helpful?