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. Metadata for Entries and Assets

Metadata for Entries and Assets

markdownView as Markdown

Metadata is a piece of information that lets you describe or classify an asset/entry.

You can manage your digital entities effectively and facilitate enhanced accessibility with additional metadata.

Note The Metadata feature allows users to update their asset metadata or entry metadata without incrementing the asset or entry version.

Note An extension or app is required to use Metadata APIs.

Get metadata

GEThttps://api.contentstack.io/v3/metadata/{metadata_uid}

The Get metadata request fetches the metadata attached to a specific asset or entry of a stack.

In the URL, you need to pass the unique ID of the metadata against the metadata_uid parameter.

Keep the following points in mind when getting metadata:

  • To retrieve metadata for a specific entry or asset, you need to have read access to that entry or asset.
  • You must pass the include_publish_details query parameter to fetch the metadata publishing details in the response.
Sample Response
Status|200 OK
12345678910111213141516171819202122232425
{
    "metadata": {
        "uid": "cs3cbeeef5a398bf0f",
        "extension_uid": "bltf5630ec72e749256",
        "type": "entry",
        "entity_uid": "blt497cb94561dbc75b",
        "_content_type_uid": "samplecontent",
        "locale": "en-us",
        "api_key": "blta3e6690c83f6854b",
        "scope": "local",
        "created_by": "blt3a5076ac97d0c8f6",
        "updated_by": "blt3a5076ac97d0c8f6",
        "created_at": "2022-03-10T07:47:42.523Z",
        "updated_at": "2022-03-10T07:47:42.523Z",
        "deleted_at": false,
        "is_published": false,
        "presets": [
            {
                "uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
                "name": "Test1",
                "options": {}
            }
        ]
    }
}

Get All Metadata

GEThttps://api.contentstack.io/v3/metadata/

The Get All Metadata request returns comprehensive information of all the metadata attached to all the entries and assets in your stack.

NoteLimited keys such as entity_uid, content_type_uid etc. are shown to the user with no access. For eg: You will see limited keys in the third object of the example response body as the user has no access to that particular entry in the stack.

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
{
    "metadata": [
        {
            "uid": "cs71bc04a2566cd9d8",
            "extension_uid": "blte879cdefd0d30f36",
            "type": "entry",
            "entity_uid": "blt9c7274d7e34e3bbb",
            "_content_type_uid": "sample",
            "locale": "en-us",
            "api_key": "blt506a64809d6fe5d5",
            "scope": "local",
            "created_by": "blte79886ae7dda55c4",
            "updated_by": "blte79886ae7dda55c4",
            "created_at": "2023-04-10T06:43:17.905Z",
            "updated_at": "2023-04-10T06:43:17.905Z",
            "deleted_at": false,
            "_version": 1,
            "presets": [
                {
                    "uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
                    "name": "Test1",
                    "options": {}
                }
            ],
            "_metadata": {
                "title": {
                    "stack": "Test 101",
                    "entity": "Sample",
                    "content_type": "Sample"
                }
            }
        },
        {
            "uid": "cs5121647dd9154d42",
            "extension_uid": "blt912e40f8b2c3c71c",
            "type": "entry",
            "entity_uid": "bltbed0b14a57107fe7",
            "_content_type_uid": "demo",
            "locale": "en-us",
            "api_key": "blt506a64809d6fe5d5",
            "scope": "local",
            "created_by": "blte79886ae7dda55c4",
            "updated_by": "blte79886ae7dda55c4",
            "created_at": "2022-12-12T12:45:59.291Z",
            "updated_at": "2022-12-12T12:45:59.291Z",
            "deleted_at": false,
            "_version": 1,
            "tags": [
                "blt1db5abe772845959:cross_stack:main:bltb346e33a286a069c",
                "bltb346e33a286a069c:main"
            ],
            "refers_to": [
                {
                    "api_key": "bltb346e33a286a069c",
                    "_content_type_uid": "cross_stack",
                    "entry_uid": "blt1db5abe772845959",
                    "branch": "main",
                    "path": "custom"
                }
            ],
            "_metadata": {
                "title": {
                    "stack": "Test 101",
                    "entity": "New entry custom",
                    "content_type": "demo"
                }
            }
        }
    ]
}

Create metadata

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

The Create metadata request lets you create metadata for a specific asset or entry. Whenever you create metadata for an entry or asset, you need to specify the extension to which it will be connected.

In the ‘Body’ section, you need to provide the following information:

  • entity_uid: Specify the unique ID of the entry or asset for which you want to create metadata.
  • type: Specify whether you want to create metadata for an entry or asset.

    NoteThe default type is an asset if not mentioned.

  • _content_type_uid: Specify the content type UID if you are creating metadata for an entry.

    NoteFor an asset type, the content type UID will be "sys_assets".

  • extension_uid: Specify the UID of the extension for which you want to create the metadata.
  • locale: Specify the language in which the entry is localized if the type is an entry. If not provided, the system defaults to the stack’s master_locale.
  • metadata key: Specify the additional metadata that you want to attach to an existing asset/entry under a key name that suits your need.

    NoteThe metadata size allowed per extension per entry/asset is 5KB. Please get in touch with our support team for any queries.

Note
  • Once a metadata is created, the associated entry or asset must be published or republished for the metadata to take effect.
  • You can provide any key name to store the metadata for your entry or asset except the following prebuilt keys: created_by, updated_by, created_at, updated_at, deleted_at, api_key, scope, locale, type, extension_uid, _version.
Sample Request
123456789101112131415
{
	"metadata": {
		"entity_uid": "bltcbdfb3f254446076",
		"type": "entry",
		"_content_type_uid": "sample_content",
		"extension_uid": "blt8c723a09fdd0b25e",
		"presets": [{
			"uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
			"name": "Test1",
			"options": {

			}
		}]
	}
}
Sample Response
Status|201 Created
1234567891011121314151617181920212223242526
{
	"notice": "Metadata created successfully.",
	"metadata": {
		"uid": "cs112ba1c547a3488c",
		"entity_uid": "bltcbdfb3f254446076",
		"type": "entry",
		"_content_type_uid": "sample_content",
		"extension_uid": "blt8c723a09fdd0b25e",
		"presets": [{
			"uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
			"name": "test1",
			"options": {

			}
		}],
		"locale": "en-us",
		"scope": "local",
		"created_by": "blt8588eda026739d77",
		"updated_by": "blt8588eda026739d77",
		"created_at": "2022-02-10T08:15:40.028Z",
		"updated_at": "2022-02-10T08:15:40.028Z",
		"api_key": "blt7a70757799323168",
		"deleted_at": false,
		"_version": 1
	}
}

Update metadata

PUThttps://api.contentstack.io/v3/metadata/{metadata_uid}

The Update metadata request lets you update the metadata for a specific entry or asset.

In the ‘Body’ section, you need to provide the metadata key, that specifies the additional metadata that you want to attach to an existing asset/entry under a key name that suits your need.

NoteThe metadata size allowed per extension per entry/asset is 5KB. Please get in touch with our support team for any queries.

You can partially update metadata for a defined key without having to specify all the key details every time you update metadata.

Keep the following points in mind when updating metadata:

  • To create/update metadata for a specific entry or asset, you need update access to that entry or asset.
  • If you update entry or asset metadata once, then you cannot recover the previous version of the metadata.
Note
  • Once a metadata is updated, the associated entry or asset must be published or republished for the metadata to take effect.
  • You can provide any key name to store the metadata for your entry or asset except the following prebuilt keys: created_by, updated_by, created_at, updated_at, deleted_at, api_key, scope, locale, type, extension_uid, _version, publish_details.
Sample Request
1234567891011121314151617181920212223242526272829303132
{
	"metadata": {
		"entity_uid": "bltcbdfb3f254446076",
		"type": "entry",
		"extension_uid": "blt8c723a09fdd0b25e",
		"locale": "en_us",
		"_content_type_uid": "sample_content",
		"presets": [{
				"uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
				"name": "test1",
				"options": {}
			},
			
			{
				"name": "Test3",
				"uid": "8418f24e-4393-4dd9-9f20-d2ecba539431",
				"options": {
					"quality": "100",
					"transform": {
						"height": 500,
						"width": 500
					},
					"image-type": "jpeg",
					"focal-point": {
						"x": 0,
						"y": 0
					}
				}
			}
		]
	}
}
Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142
{
    "notice": "Metadata updated successfully.",
    "metadata": {
        "uid": "cs112ba1c547a3488c",
        "entity_uid": "bltcbdfb3f254446076",
        "type": "entry",
        "_content_type_uid": "sample_content",
        "extension_uid": "blt8c723a09fdd0b25e",
        "presets": [
            {
                "uid": "d9300b22-f37d-4b25-93df-fc0395d62814",
                "name": "test1",
                "options": {}
            },
            
            {
                "name": "Test3",
                "uid": "8418f24e-4393-4dd9-9f20-d2ecba539431",
                "options": {
                    "quality": "100",
                    "transform": {
                        "height": 500,
                        "width": 500
                    },
                    "image-type": "jpeg",
                    "focal-point": {
                        "x": 0,
                        "y": 0
                    }
                }
            }
        ],
        "locale": "en-us",
        "scope": "local",
        "created_by": "blt8588eda026739d77",
        "updated_by": "blt8588eda026739d77",
        "created_at": "2022-02-10T08:15:40.028Z",
        "updated_at": "2022-02-10T09:58:05.518Z",
        "api_key": "blt7a70757799323168",
        "deleted_at": false
    }
}

Delete metadata

DELETEhttps://api.contentstack.io/v3/metadata/{metadata_uid}

The Delete metadata request lets you delete the metadata associated with a specific entry or asset.

In the URL, you need to pass the unique ID of the metadata that you want to delete against the metadata_uid parameter.

Keep the following points in mind when deleting metadata:

  • To delete metadata for a specific entry or asset, you need delete access to that entry or asset.
  • Once you delete entry or asset metadata, it is permanently deleted and cannot be restored.
Sample Response
Status|200 OK
123
{
	"notice": "Metadata deleted successfully."
}

Publish metadata

POSThttps://api.contentstack.io/v3/metadata/{metadata_uid}/publish

The Publish metadata request lets you publish the metadata associated with a specific entry or asset.

In the URL, you need to pass the unique ID of the metadata that you want to publish against the metadata_uid parameter.

Keep the following points in mind when publishing metadata:

  • When you publish an entry/asset, the associated metadata of that entry/asset will also get published.

    TipIf you publish only the metadata without publishing the corresponding asset or entry, the metadata will not resolve if you pass include_metadata: true. As a best practice, always publish the associated asset or entry.

  • You must pass the include_publish_details query parameter to fetch the metadata publishing details in the response.
Sample Request
12345678910
{
  "metadata": {
    "environments": [
      "test"
    ],
    "locales": [
      "en-us"
    ]
  }
}
Sample Response
Status|200 OK
123
{
    "notice": "Metadata sent for publishing."
}

Unpublish metadata

POSThttps://api.contentstack.io/v3/metadata/{metadata_uid}/unpublish

The Unpublish metadata request lets you unpublish the metadata associated with a specific entry or asset.

In the URL, you need to pass the unique ID of the metadata that you want to unpublish against the metadata_uid parameter.

Sample Request
12345678910
{
  "metadata": {
    "environments": [
      "test"
    ],
    "locales": [
      "en-us"
    ]
  }
}
Sample Response
Status|200 OK
123
{
    "notice": "Metadata sent for unpublishing."
}
Hide Parameters

URL Parameters

metadata_uidrequiredstring

Enter the unique ID of the metadata that you want to fetch. You can find the metadata UID by running the Get all assets API request or Get all entries API request.

Example:

cs3cbeeef5a398bf0f

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
include_publish_detailsoptionalstring

Enter 'true' to include the publish details of the entry.

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias 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
include_multi_stackoptionalstring

Set this to 'true' to fetch data from multiple stacks.

Example:

false
include_multi_branchoptionalstring

Set this to 'true' to fetch data from multiple branches.

Example:

false
include_title[]optionalstring

You can request multiple titles in a single response. For example:

  • Set to ‘content_type’ to fetch the name of the content type.
  • Set to ‘stack’ to fetch the name of the stack.
  • Set to ‘entity’ to fetch the title of the entity. An entity could be either an entry or an asset.

Example:

content_type
limitoptionalstring

Set the limit in between ‘0-100’ to limit the number of items returned as response.

Example:

50
skipoptionalstring

Set this as ‘0’ to skip the number of items from the response body.

Example:

7
queryoptionalstring

Set this to {{{key}}:{{value}}}. This key allows you to fetch the data that matches the query value.

Example:

{“tags” :”presetBuilder”}
ascoptionalstring

Set this to {{key}}. This key will fetch the data in the ascending order as per the defined value.

Example:

type
descoptionalstring

Set this to {{key}}. This key will fetch the data in the descending order as per the defined value.

Example:

type
only[BASE][]optionalstring

Set this to {{key}}. This key will only return the data defined in the value field.

Example:

presets
except[BASE][]optionalstring

Set this to {{key}}. This key will not return the data defined in the value field.

Example:

created_by

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main
Hide Parameters

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main
Hide Parameters

URL Parameters

metadata_uidrequiredstring

Enter the unique ID of the metadata that you want to update. You can find the metadata UID by running the Get all assets or Get all entries API request.

Example:

cs112ba1c547a3488c

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main
Hide Parameters

URL Parameters

metadata_uidrequiredstring

Enter the unique ID of the metadata that you want to delete. You can find the metadata UID by running the Get all assets API request or Get all entries API request.

Example:

cs3cbeeef5a398bf0f

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 management token.

Example:

your_management_token
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main
Hide Parameters

URL Parameters

metadata_uidrequiredstring

Enter the unique ID of the metadata that you want to publish. You can find the metadata UID by passing include_metadata parameters while running the Get all assets API request or Get all entries API request.

Example:

blt045d039eb6f2f9df

Query Parameters

include_publish_detailsoptionalstring

Enter 'true' to include the publish details of the entry.

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main
Hide Parameters

URL Parameters

metadata_uidoptionalstring
Enter the unique ID of the metadata that you want to unpublish. You can find the metadata UID by

by passing include_metadata parameters while running the Get all assets API request or Get all entries API request.

Example:

blt045d039eb6f2f9df

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 management token.

Example:

your_management_token
Content-Typerequiredstring

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

Example:

application/json
branchoptionalstring

Enter your branch or alias unique ID.

Example:

main