Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • Github
  • Youtube
  • Discord
  • X

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • Github
  • Youtube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Content Management API
  4. Languages

Languages

markdownView as Markdown

Contentstack has a sophisticated multilingual capability. It allows you to create and publish entries in any language. This feature allows you to set up multilingual websites and cater to a wide variety of audience by serving content in their local language(s).

Read more about Languages.

You can now pass the branch header in the API request to fetch or manage modules located within specific branches of the stack. Additionally, you can also set the include_branch query parameter to true to include the _branch top-level key in the response. This key specifies the unique ID of the branch where the concerned Contentstack module resides.

Get all languages

GEThttps://api.contentstack.io/v3/locales?include_count={boolean_value}

This call fetches the list of all languages (along with the language codes) available for a stack.

To configure the permissions for your application via OAuth, please include the cm.languages.management:read scope.
When executing the API call, under the 'Header' section, you need to enter the authtoken that you receive after logging into your account.

You can add queries to extend the functionality of this API call. Under the URL Parameters section, insert a parameter named query and provide a query in JSON format as the value.

To learn more about the queries, refer to the Queries section of the Content Delivery API doc.

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627
{
	"locales": [{
			"code": "zh-cn",
			"uid": "qwertyuiop123456",
			"created_by": "abcd1234567890",
			"updated_by": "abcd1234567890",
			"created_at": "2015-01-08T15:07:53.495Z",
			"updated_at": "2015-01-08T15:07:53.495Z",
			"name": "Chinese - China",
			"ACL": {},
			"_version": 1,
			"fallback_locale": "en-us"
		},
		{
			"code": "ja-jp",
			"uid": "qwertyuiop123321",
			"created_by": "abcd1234567890",
			"updated_by": "abcd1234567890",
			"created_at": "2015-01-08T15:08:13.495Z",
			"updated_at": "2015-01-08T15:08:13.495Z",
			"name": "Japanese - Japan",
			"ACL": [],
			"_version": 1,
			"fallback_locale": "en-us"
		}
	]
}

Add a language

POSThttps://api.contentstack.io/v3/locales

This call lets you add a new language to your stack. You can either add a supported language or a custom language of your choice.
To configure the permissions for your application via OAuth, please include the cm.languages.management:write scope.

When executing the API call, under the 'Header' section, you need to enter the API key of your stack and the authtoken that you receive after logging into your account.

In the 'Body' section, enter the language name and code in JSON format. You can also specify the fallback language you want to assign to the new language within the same JSON.

WarningOnce generated, you cannot modify a custom language code. However, you can update the language name and fallback language if required.

Sample Request
1234567
{
  "locale":{
    "name":"Arabic - Bahrain",
    "code":"ar-bh",
    "fallback_locale":"en-us"
  }
}
Sample Response
Status|201 Created
123456789101112131415
{
    "notice": "Language added successfully.",
    "locale": {
        "code": "ar-bh",
        "uid": "blt3e7b80f501b604ef",
        "created_by": "blt7b815b05d2fe5dd8",
        "updated_by": "blt7b815b05d2fe5dd8",
        "created_at": "2021-07-01T10:20:16.887Z",
        "updated_at": "2021-07-01T10:20:16.887Z",
        "fallback_locale": "en-us",
        "name": "Arabic - Bahrain",
        "ACL": {},
        "_version": 1
    }
}

Get a language

GEThttps://api.contentstack.io/v3/locales/{code}

The Get a language call returns information about a specific language available on the stack.

When executing the API call, under the 'Header' section, you need to enter the authtoken that you receive after logging into your account.
To configure the permissions for your application via OAuth, please include the cm.languages.management:read scope.

Sample Response
Status|200 OK
1234567891011121314
{
  "locale": {
    "code": "zh-cn",
    "uid": "qwertyuiop123456",
    "created_by": "abcd1234567890",
    "updated_by": "abcd1234567890",
    "created_at": "2015-01-08T15:07:53.495Z",
    "updated_at": "2015-01-08T15:07:53.495Z",
    "name": "Chinese - China",
    "ACL": {},
    "_version": 1,
    "tags": []
  }
}

Update language

PUThttps://api.contentstack.io/v3/locales/{code}

The Update language call will let you update the details (such as display name) and the fallback language of an existing language of your stack.
To configure the permissions for your application via OAuth, please include the cm.languages.management:write scope.

When executing the API call, under the 'Header' section, you need to enter the authtoken that you receive after logging into your account.

In the 'Body' section, enter the updated details of your language name and fallback language in JSON format.

Sample Request
123456
{
  "locale":{
    "name":"Updated Locale Name",
    "fallback_locale":"zh-cn"
  }
}
Sample Response
Status|200 OK
123456789101112131415
{
    "notice": "Language updated successfully.",
    "locale": {
        "code": "ar-bh",
        "uid": "blt3e7b80f501b604ef",
        "created_by": "blt7b815b05d2fe5dd8",
        "updated_by": "blt7b815b05d2fe5dd8",
        "created_at": "2021-07-01T10:20:16.887Z",
        "updated_at": "2021-07-01T10:47:43.068Z",
        "fallback_locale": "zh-cn",
        "name": "Updated Locale Name",
        "ACL": {},
        "_version": 3
    }
}

Delete language

DELETEhttps://api.contentstack.io/v3/locales/{code}

The Delete language call deletes an existing language from your stack.

When executing the API call, under the 'Header' section, you need to enter the API key of your stack and the authtoken that you receive after logging into your account.
To configure the permissions for your application via OAuth, please include the cm.languages.management:write scope.

Sample Response
Status|200 OK
123
{
  "notice": "Language removed successfully."
}

Set a fallback language

POSThttps://api.contentstack.io/v3/locales

The Set a fallback language request allows you to assign a fallback language for an entry in a particular language.

When executing the API call, under the 'Header' section, you need to enter the API key of your stack and the authtoken that you receive after logging in to your account.

In the 'Body' section, enter the language codes in JSON format.
To configure the permissions for your application via OAuth, please include the cm.languages.management:write scope.

NoteThe language set as a fallback language will always inherit data from the master language if it does not have localized content.

Sample Request
1234567
{
  "locale": {
    "name": "German - German",
    "code": "de-de",
    "fallback_locale": "de-en"
  }
}
Sample Response
Status|201 Created
1234567
{
  "locale": {
    "name": "German - German",
    "code": "de-de",
    "fallback_locale": "de-en"
  }
}

Update fallback language

PUThttps://api.contentstack.io/v3/locales/{locale_uid}

The Update fallback language request allows you to update the fallback language for an existing language of your stack.

When executing the API call, under the 'Header' section, you need to enter the API key of your stack and the authtoken that you receive after logging in to your account.

In the 'Body' section, enter the updated details of the fallback language in JSON format.
To configure the permissions for your application via OAuth, please include the cm.languages.management:write scope.

NoteThe language set as a fallback language will always inherit data from the master language if it does not have localized content.

Sample Request
1234567
{
  "locale": {
    "name": "German",
    "code": "de",
    "fallback_locale": "en-us"
      }
}
Sample Response
Status|201 Created
123456789101112131415
{
    "notice": "Language updated successfully.",
    "locale": {
        "code": "de",
        "name": "German",
        "fallback_locale": "en-us",
        "uid": "blt9627e0b4fe7b5986",
        "created_by": "blt58fb93b4f1c8e17b",
        "updated_by": "bltf6c2ef24db42bde6",
        "created_at": "2023-02-17T11:56:25.173Z",
        "updated_at": "2023-02-27T13:19:03.106Z",
        "ACL": {},
        "_version": 1
    }
}

Language fallback allows entries created in a particular language to initially inherit data from the fallback language instead of directly inheriting content from the master language. For more information, refer the documentation for Fallback Language.

Hide Parameters

Query Parameters

include_countoptionalstring

Set this parameter to 'true' to include in response the total count of languages added to your stack.

Example:

false
include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
branchoptionalstring

Enter your branch unique ID.

Example:

false
Hide Parameters

URL Parameters

coderequiredstring

Enter the code of the language that you want to retrieve.

Example:

fr-fr

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

coderequiredstring

Enter the code of the language that you wish to update.

Example:

your_language_code

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

coderequiredstring

Enter the code of the language that you wish to delete. 

Example:

fr-fr

Headers

api_keyrequiredstring

Example:

the API key of your stack
authtokenoptionalstring

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

Query Parameters

include_languageoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

the API key of your stack
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

locale_coderequiredstring

Enter the language code of the language that you want to assign as a fallback language for an existing language of your stack.

Example:

zh-cn

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

the API key of your stack
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication.

Example:

[Bearer <OAuth token>] or [your_management_token]
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
branchoptionalstring

Enter your branch unique ID.

Example:

main