How to manage article translations via API?

Markdown

View as Markdown

If your center is configured with additional languages, every article can carry independent translations for each of them. The API lets you read, write, publish, and delete translations per article and per language.

Check which languages are configured

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

The center response includes default_language and an additional_languages array (e.g. ["de", "fr"]). Translations can only be created for configured languages.

The rules

  1. The default-language article must be published first. Publishing a translation before the root article is live returns a root_not_published error.
  2. Translations are per-article. Each article manages its own set of translated drafts and published versions. An article's translations array lists the language codes with published translations.
  3. Translation URLs use a path prefix. A German translation lives at https://yourdomain.help.center/de/article/42-slug.
  4. Unpublishing the root cascades. Unpublishing the default-language article also unpublishes all of its translations.

Write a translation

Set the translation's draft content — at least one of title or html is required:

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Erste Schritte mit Acme",
    "html": "<h2>Willkommen</h2><p>So legen Sie los...</p>"
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/translations/de/draft"

Translation metadata (URL slug and SEO) is updated separately:

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "erste-schritte",
    "seo": { "metaTitle": "...", "metaDesc": "..." }
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/articles/ARTICLE_ID/translations/de/metadata"

Publish a translation

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

The root article must already be published, and the translation must have a title or content. A slug is auto-generated from the translated title if one doesn't exist.

To take a single translation offline without touching the root article, call the /unpublish variant — the translation draft is preserved.

Read a translation

# Published version (404 unless both root and translation are published)
GET /v0/centers/:centerId/articles/:articleId/translations/:language?expand[]=content

# Draft version, including unpublished changes
GET /v0/centers/:centerId/articles/:articleId/translations/:language/draft?expand[]=content

Delete a translation

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

Permanently removes both the draft and published content for that language. Returns 204 No Content.

Endpoint reference

ActionMethodEndpointScope
Get translationGET.../articles/:articleId/translations/:langcontent.read
Get translation draftGET.../articles/:articleId/translations/:lang/draftcontent.read
Update translation draftPATCH.../articles/:articleId/translations/:lang/draftcontent.write
Update translation metadataPATCH.../articles/:articleId/translations/:lang/metadatacontent.write
Publish translationPOST.../articles/:articleId/translations/:lang/publishcontent.publish
Unpublish translationPOST.../articles/:articleId/translations/:lang/unpublishcontent.publish
Delete translationDELETE.../articles/:articleId/translations/:langcontent.delete

Next steps

Related Articles

Was this article helpful?