Translations

Translations represent the content in all supported languages of a Help Center item such as an article or a section. The default language is also included in the translations.

JSON Format

Translations are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
body string false false The body of the translation. Empty by default
created_at string true false The time at which the translation was created
created_by_id integer true false The id of the user who created the translation
draft boolean false false True if the translation is a draft; false otherwise. False by default
html_url string true false The url of the translation in Help Center
id integer true false Automatically assigned when a translation is created
locale string false true The locale of the translation
outdated boolean false false True if the translation is outdated; false otherwise. False by default
source_id integer true false The id of the item that has this translation
source_type string true false The type of the item that has this translation. Can be "article", "section", or "category".
title string false true The title of the translation
updated_at string true false The time at which the translation was last updated
updated_by_id integer true false The id of the user who last updated the translation
url string true false The API url of the translation
Example
{
  "id": 3243452,
  "locale": "en",
  "source_id": 768934,
  "source_type": "Article",
  "title": "Hello translation"
}

List Translations

  • GET /api/v2/help_center/articles/{article_id}/translations
  • GET /api/v2/help_center/sections/{section_id}/translations
  • GET /api/v2/help_center/categories/{category_id}/translations

Lists all translations for a given article, section, or category.

Allowed for
  • Agents
  • End users

For end users, the response will list only the translations for articles, sections, or categories that they can view in Help Center.

Parameters
Name Type In Required Description
draft boolean Query false Only return translations with the given draft status
locales array Query false Only return translations in the given locales
outdated boolean Query false Only return translations with the given outdated status
article_id integer Path true The unique ID of this Article
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations.json?outdated=true \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "translations": [
    {
      "id": 634578,
      "locale": "en-us",
      "outdated": true,
      "source_id": 348756,
      "source_type": "Article",
      "title": "Translation title"
    }
  ]
}

Create Translation

  • POST /api/v2/help_center/articles/{article_id}/translations
  • POST /api/v2/help_center/sections/{section_id}/translations
  • POST /api/v2/help_center/categories/{category_id}/translations

Creates a translation for a given article, section, or category. Any locale that you specify must be enabled for the current Help Center. The locale must also be different from that of any existing translation associated with the source object.

Allowed for
  • Help Center Managers
  • Agents (article translations only)

The requesting agent can create an article translation only if they can edit the article in Help Center.

Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations.json \
  -d '{"translation": {"locale": "en-us", "title": "Super Hero Tricks", "body": "This article contains a collection of Super Hero tricks"}}' \
  -v -u {email_address}:{password} -X POST -H "Content-Type: application/json"
Example Response
Status 201 Created

{
  "translation": {
    "id": 634578,
    "locale": "en-us",
    "source_id": 348756,
    "source_type": "Article",
    "title": "How to take pictures in low light"
  }
}

List Missing Translations

  • GET /api/v2/help_center/articles/{article_id}/translations/missing
  • GET /api/v2/help_center/sections/{section_id}/translations/missing
  • GET /api/v2/help_center/categories/{category_id}/translations/missing

Lists the locales that don't have a translation for a given article, section, or category.

Allowed for
  • Agents
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations/missing.json \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "locales": [
    "en-us",
    "da-dk"
  ]
}

Show Translation

  • GET /api/v2/help_center/articles/{article_id}/translations/{locale}
Allowed for
  • Agents
  • End-users
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
locale string Path true Mandatory locale parameter
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations/{locale}.json \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "translation": {
    "id": 634578,
    "locale": "en-us",
    "source_id": 348756,
    "source_type": "Article",
    "title": "How to take pictures in low light"
  }
}

Update Translation

  • PUT /api/v2/help_center/articles/{article_id}/translations/{locale}
  • PUT /api/v2/help_center/sections/{section_id}/translations/{locale}
  • PUT /api/v2/help_center/categories/{category_id}/translations/{locale}

When updating a translation, any locale that you specify must be enabled for the current Help Center. If you change the translation locale, it must be different from that of any existing translation associated with the same source object.

Allowed for
  • Agents (only articles)
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
locale string Path true Mandatory locale parameter
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/translations/{locale}.json \
  -d '{"translation": {"title": "How to use HDR"}}' \
  -v -u {email_address}:{password} -X PUT -H "Content-Type: application/json"
Example Response
Status 200 OK

{
  "translation": {
    "id": 634578,
    "locale": "en-us",
    "source_id": 348756,
    "source_type": "Article",
    "title": "How to take pictures in low light"
  }
}

Delete Translation

  • DELETE /api/v2/help_center/articles/{article_id}/translations/{translation_id}

Deletes a translation, provided it's not the only translation for the source object.

Allowed for
  • Agents
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
translation_id integer Path true The unique ID of this Translation
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/translations/{translation_id}.json \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status 204 No Content

List all enabled locales and default locale

  • GET /api/v2/help_center/locales
Allowed for
  • Agents
  • End-users
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/locales" \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "default_locale": "it-it",
  "locales": [
    "de-de",
    "en-uk",
    "en-us",
    "es-419",
    "es-es",
    "fr-fr",
    "it-it",
    "ja-jp",
    "pt-br"
  ]
}