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. Labels

Labels

markdownView as Markdown

Labels allow you to group a collection of content within a stack. Using labels you can group content types that need to work together. Read more about Labels.

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 labels

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

The Get all labels call fetches all the existing labels of the stack.

When executing the API call, under the 'Headers' section, enter the API key of your stack and management_token in the Authorization parameters.
To configure the permissions for your application via OAuth, include the cm.labels.management:readscope.

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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
{
	"labels": [{
			"name": "Others",
			"parent": [],
			"uid": "blt3d33e33ea3bcf3f3",
			"created_by": "blt123123123123",
			"updated_by": "blt123123123123",
			"created_at": "2020-07-27T01:58:49.227Z",
			"updated_at": "2020-07-27T01:58:49.227Z",
			"ACL": [],
			"_version": 1,
			"content_types": [
				"bank",
				"brand",
				"category",
				"for_synchronization_calls"
			]
		},
		{
			"name": "Household items",
			"parent": [
				"blt77777f77ebe77e7c"
			],
			"uid": "blt48285aba9e3e5305",
			"created_by": "blt123123123123",
			"updated_by": "blt123123123123",
			"created_at": "2020-07-27T01:57:04.139Z",
			"updated_at": "2020-07-27T01:57:04.139Z",
			"ACL": [],
			"_version": 1,
			"content_types": [
				"kitchen_appliances",
				"electronics"
			]
		},
		{
			"name": "All Products",
			"parent": [],
			"uid": "blt77777f77ebe77e7c",
			"created_by": "blt123123123123",
			"updated_by": "blt123123123123",
			"created_at": "2020-07-27T01:55:48.514Z",
			"updated_at": "2020-07-27T01:55:48.514Z",
			"ACL": [],
			"_version": 1,
			"content_types": [
				"product"
			]
		}
	]
}

Get a single label

GEThttps://api.contentstack.io/v3/labels/{label_uid}

The Get a single label call returns information about a particular label of a stack.

When executing the API call, add the label_uid as a URL parameter and management_token in the Authorization parameters.

To configure the permissions for your application via OAuth, please include the cm.labels.management:readscope.

Sample Response
Status|200 OK
12345678910111213
{
	"label": [{
		"name": "Test",
		"parent": [],
		"uid": "1234567890abcdef",
		"created_by": "sys_bltf123456789012",
		"updated_by": "sys_bltf123456789012",
		"created_at": "2015-01-08T15:07:53.495Z",
		"updated_at": "2015-01-08T15:07:53.495Z",
		"ACL": {},
		"_version": "1"
	}]
}

Add label

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

The Add label call is used to create a label.

When executing the API call, under the 'Headers' section, add the API key of your stack and management_token in the Authorization parameters.

In the 'Body' section, enter the label details, such as the name of the label, the uid of the parent label, and the content types that need to be included in the label. These details need to be provided in JSON format.
To configure the permissions for your application via OAuth, please include the cm.labels.management:writescope.

Sample Request
1234567891011
{
  "label": {
    "name": "Test",
    "parent": [
      "label_uid"
    ],
    "content_types": [
      "content_type_uid"
    ]
  }
}
Sample Response
Status|201 Created
123456789101112131415
{
  "notice": "Label created successfully.",
  "label": {
    "name": "Test",
    "parent": [],
    "uid": "1234567890abcdef",
    "updated_by": "sys_bltf123456789012",
    "created_by": "sys_bltf123456789012",
    "created_at": "2015-01-08T15:07:53.495Z",
    "updated_at": "2015-01-08T15:07:53.495Z",
    "ACL": {},
    "content_types": [],
    "_version": "1"
  }
}

Update label

PUThttps://api.contentstack.io/v3/labels/{label_uid}

The Update label call is used to update an existing label.

When executing the API call add the label_uid as a URL parameter and management_token in the Authorization parameters.

In the 'Body' section, enter the updated details of your label, which include the name of the label, the uid of the parent label, and the content types that need to be included in the label. These details need to be provided in JSON format.
To configure the permissions for your application via OAuth, please include the cm.labels.management:writescope.

Sample Request
1234567891011
{
  "label": {
    "name": "Test",
    "parent": [
      "label_uid"
    ],
    "content_types": [
      "content_type_uid"
    ]
  }
}
Sample Response
Status|200 OK
1234567891011121314151617
{
	"notice": "Label updated successfully.",
	"label": {
		"name": "Test",
		"parent": [],
		"uid": "1234567890abcdef",
		"updated_by": "sys_bltf123456789012",
		"created_by": "sys_bltf123456789012",
		"created_at": "2015-01-08T15:07:53.495Z",
		"updated_at": "2015-01-08T15:07:53.495Z",
		"ACL": {},
		"tags": [],
		"content_types": [],
		"_version": "2",
		"isLabel": true
	}
}

Delete label

DELETEhttps://api.contentstack.io/v3/labels/{label_uid}

The Delete label call is used to delete a specific label.

When executing the API call, add the management_token in the Authorization parameters.
To configure the permissions for your application via OAuth, please include the cm.labels.management:writescope.

Sample Response
Status|200 OK
123
{
  "notice": "Label deleted successfully."
}
Hide Parameters

URL Parameters

queryoptionalstring

Query to retrieve all labels of the stack.

Example:

{"type":"dashboard", "enable": true}

Query Parameters

include_countoptionalstring

Set this parameter to 'true' to include in response the total count of labels applied to content types.

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:

the API key of the 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]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

label_uidrequiredstring

Enter the unique ID of the label that you want to retrieve.

Example:

blt5d1761bce4b36d57

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

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 the 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

label_uidrequiredstring

Enter the unique ID of the label that needs to be updated. 

Example:

blt5d1761bce4b36d57

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]
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

label_uidrequiredstring

Enter the unique ID of the label that you want to delete.

Example:

blt5d1761bce4b36d57

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