How to create and publish help articles via API?

Markdown

View as Markdown

The Articles API lets you create help articles, edit their content, and publish them to your live help center. Every article starts life as a draft — nothing is visible to customers until you explicitly publish it.

Create an article

POST /v0/centers/:centerId/articles

Requires the content.write scope.

FieldRequiredDescription
titleYesArticle title.
content.htmlNoHTML content body. Defaults to empty if omitted.
category_idNoCategory to file the article under. Defaults to the first category if omitted.
metadata.seoNoSEO object with metaTitle (50–60 chars) and metaDesc (150–160 chars).
curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting started with Acme",
    "content": {
      "html": "<h2>Welcome</h2><p>Here is how to get started...</p>"
    },
    "category_id": "CATEGORY_ID",
    "metadata": {
      "seo": {
        "metaTitle": "Getting started with Acme",
        "metaDesc": "Set up your Acme account in three steps."
      }
    }
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles"

The response is the new draft object, including its content and a preview_url you can open to review the article before it goes live.

Write content as clean, semantic HTML: <h2> for sections, <h3> for subsections, <p> for paragraphs, <ul>/<ol> for lists, <pre><code> for code blocks, and <a href="..."> for links. The API sanitizes HTML on publish.

Tip

Search before you create. GET /articles?search=TERM and GET /articles/drafts?search=TERM tell you whether an article on the topic already exists, so you can update it instead of creating a duplicate.

Update an article's content

Content edits always go through the draft:

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated title",
    "html": "<h2>Updated content</h2><p>...</p>"
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/draft"

The draft endpoint accepts only title and html — the plain-text version is generated automatically from the HTML. Send the full updated HTML: fetch the current content first with expand[]=content, merge in your change, and send everything back.

Edits to a published article do not go live until you publish again. See How do article drafts work? for the full draft lifecycle.

Update metadata

Metadata changes are separate from content and apply to the published article immediately — no publish step needed:

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "NEW_CATEGORY_ID",
    "subtitle": "A short subtitle",
    "slug": "custom-url-slug",
    "seo": { "metaTitle": "...", "metaDesc": "..." }
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/metadata"

All fields are optional, but at least one must be provided. Individual SEO fields can also be updated separately as seo.metaTitle or seo.metaDesc.

Publish

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

Publishing requires the content.publish scope. It takes the current draft content live and sanitizes the HTML. The article's public URL looks like:

https://yourdomain.help.center/article/42-article-slug

Tip

Articles created via the API start without a URL slug, so the public URL ends in just the number until you set one. Set a descriptive kebab-case slug via the metadata endpoint (PATCH /articles/:articleId/metadata with "slug") as part of your create flow.

Please Note

Every published article is automatically ingested by the AI. Future changes are fed to the AI automatically too, so it keeps giving customers answers based on your latest content.

Read published articles

Published-article endpoints return only live content — a draft that has never been published returns 404 here.

# List, with optional search and category filters
GET /v0/centers/:centerId/articles?search=TERM&category=CAT_ID&expand[]=content

# Get one article
GET /v0/centers/:centerId/articles/:articleId?expand[]=content

# Count
GET /v0/centers/:centerId/articles/count

Duplicate or delete

POST /articles/:articleId/duplicate creates a copy titled "Copy of ..." with all metadata and translation drafts, always as an unpublished draft.

DELETE /articles/:articleId permanently deletes the article, its draft, and all translations. This cannot be undone.

Endpoint reference

ActionMethodEndpointScope
List articlesGET/v0/centers/:centerId/articlescontent.read
Get articleGET/v0/centers/:centerId/articles/:articleIdcontent.read
Count articlesGET/v0/centers/:centerId/articles/countcontent.read
Create articlePOST/v0/centers/:centerId/articlescontent.write
Update draftPATCH/v0/centers/:centerId/articles/:articleId/draftcontent.write
Update metadataPATCH/v0/centers/:centerId/articles/:articleId/metadatacontent.write
PublishPOST/v0/centers/:centerId/articles/:articleId/publishcontent.publish
UnpublishPOST/v0/centers/:centerId/articles/:articleId/unpublishcontent.publish
DuplicatePOST/v0/centers/:centerId/articles/:articleId/duplicatecontent.write
DeleteDELETE/v0/centers/:centerId/articles/:articleIdcontent.delete

Next steps

Related Articles

Was this article helpful?