Zendesk Support can be viewed in a number of supported languages. The Locales API retrieves locale information in Support or a Zendesk account.

JSON format

Locales are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
created_at string true false The ISO 8601 formatted date-time the locale was created
id integer true false The unique ID of the locale
locale string true false The name of the locale
name string true false The name of the language
updated_at string true false The ISO 8601 formatted date-time when the locale was last updated
url string true false The URL of the locale record

Example

{  "created_at": "2009-07-20T22:55:29Z",  "id": 1,  "locale": "en-US",  "name": "English",  "updated_at": "2011-05-05T10:38:52Z",  "url": "https://company.zendesk.com/api/v2/locales/en-US.json"}

List Locales

  • GET /api/v2/locales

Lists the translation locales available for the account.

Note: You can alter the list by passing an updated locale_ids array to the Update Account Settings endpoint.

Allowed For

  • Anyone

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "locales": [    {      "created_at": "2009-07-20T22:55:29Z",      "id": 1,      "locale": "en-US",      "name": "English",      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://company.zendesk.com/api/v2/locales/en-US.json"    },    {      "created_at": "2010-12-23T12:45:22Z",      "id": 8,      "locale": "de",      "name": "Deutsch",      "updated_at": "2012-04-01T10:44:12Z",      "url": "https://company.zendesk.com/api/v2/locales/de.json"    }  ]}

List Locales for Agent

  • GET /api/v2/locales/agent

Lists the translation locales that have been localized for agents on a specific account.

Allowed For

  • Anyone

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales/agent.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "locales": [    {      "created_at": "2009-07-20T22:55:29Z",      "id": 1,      "locale": "en-US",      "name": "English",      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://company.zendesk.com/api/v2/locales/en-US.json"    },    {      "created_at": "2010-12-23T12:45:22Z",      "id": 8,      "locale": "de",      "name": "Deutsch",      "updated_at": "2012-04-01T10:44:12Z",      "url": "https://company.zendesk.com/api/v2/locales/de.json"    }  ]}

List Available Public Locales

  • GET /api/v2/locales/public

Lists the translation locales that are available to all accounts.

Allowed For

  • Anyone

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales/public.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "locales": [    {      "created_at": "2009-07-20T22:55:29Z",      "id": 1,      "locale": "en-US",      "name": "English",      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://company.zendesk.com/api/v2/locales/en-US.json"    },    {      "created_at": "2010-12-23T12:45:22Z",      "id": 8,      "locale": "de",      "name": "Deutsch",      "updated_at": "2012-04-01T10:44:12Z",      "url": "https://company.zendesk.com/api/v2/locales/de.json"    }  ]}

Show Current Locale

  • GET /api/v2/locales/current

This works like Show Locale, but instead of taking a locale id as an argument, it renders the locale of the user performing the request.

Allowed For

  • Anyone

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales/current.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "locale": {    "created_at": "2010-12-23T12:45:22Z",    "id": 8,    "locale": "de",    "name": "Deutsch",    "updated_at": "2012-04-01T10:44:12Z",    "url": "https://company.zendesk.com/api/v2/locales/de.json"  }}

Show Locale

  • GET /api/v2/locales/{locale_id}

Allowed For

  • Anyone

Parameters

Name Type In Required Description
locale_id string Path true The ID or the BCP-47 code of the locale. Examples: es-419, en-us, pr-br

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales/{locale_id}.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "locale": {    "created_at": "2010-12-23T12:45:22Z",    "id": 8,    "locale": "de",    "name": "Deutsch",    "updated_at": "2012-04-01T10:44:12Z",    "url": "https://company.zendesk.com/api/v2/locales/de.json"  }}

Detect Best Language for User

  • GET /api/v2/locales/detect_best_locale

Allowed For

  • Anyone

Using curl

curl https://{subdomain}.zendesk.com/api/v2/locales/detect_best_locale \  -v -u {email_address}:{password} \  -H "Content-Type: application/json" -X PUT \  -d '{"available_locales":["es", "ja", "en-uk"]}'

Example response(s)

200 OK
Status 200 OK
{  "locale": {    "created_at": "2010-12-23T12:45:22Z",    "id": 1,    "locale": "en",    "name": "English",    "updated_at": "2012-04-01T10:44:12Z",    "url": "https://company.zendesk.com/api/v2/locales/en-US.json"  }}