List Locales

GET /api/v2/locales.json

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

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

List Available Public Locales

GET /api/v2/locales/public.json

This 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

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

List Locales for Agent

GET /api/v2/locales/agent.json

This 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

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

Show Locale

GET /api/v2/locales/{id}.json

Allowed For

  • Anyone

Using curl

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

Request parameters

Name Type Description
id string Either the ID or the bcp-47 code of the locale (es-419, en-us, pr-br)

Example Response

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

Show Current Locale

GET /api/v2/locales/current.json

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

Detect best language for user

GET /api/v2/locales/detect_best_locale.json

Allowed For

  • Anyone

Using curl

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

Example Response

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