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. Entry Variants

Entry Variants

markdownView as Markdown

Entry Variants allows you to create content variations for different audiences, languages, and marketing experiments. The key concepts include Base Entry, Entry Variant, and Variant Group. This feature streamlines personalized content management, improves consistency, and simplifies updates.

NoteThe Entry Variants feature is currently available as part of an Early Access Program and may not be available to all users. For more information, you can reach out to our support team.

Create entry variant

PUThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/variants/{variant_uid}

The Create entry variant request lets you create an entry variant of your existing base entry.

NoteYou must have variant groups linked to relevant content type(s). If you have not linked your content types to a variant group yet, refer to the Link Content Type request.

In the “Body” section, include only the fields that require updating for the entry variant. The system detects changes automatically based on the values provided. All other fields inherit their values from the base entry. For Group and Modular Blocks fields with multiple instances, use the _order property to define the preferred sequence of instance UIDs.

    {
  "entry": {
    "title": "red",
    "url": "/red",
    "single_line": "Red variant",
    "group": [
      {
        "single_line": "Red variant group 1",
        "_metadata": {
          "uid": "cs5bafacf1e94ff8c2"
        }
      },
      {
        "single_line": "Red variant group 2",
        "_metadata": {
          "uid": "csc30ef8fdc0b190fe"
        }
      }
    ],
    "_variant": {
      
      "_order": [
        {
          "group": [
            "base.csc30ef8fdc0b190fe",
            "base.cs5bafacf1e94ff8c2"
          ]
        }
      ]
    }
  }
}

Note:

  • The _change_set field is automatically included in the response to indicate which fields were updated in the entry variant.
  • The system also detects changes in nested fields and includes them in the _change_set field of the response.
Sample Request
12345678910111213141516171819202122232425262728293031323334
{
  "entry": {
    "title": "red",
    "url": "/red",
    "single_line": "Red variant",
    "group": [
      {
        "single_line": "Variant 2",
        "_metadata": {
          "uid": "cs5bafacf1e94ff8c2"
        },
        "multi_line": "Variant 2 Multi"
      },
      {
        "single_line": "Variant 1",
        "_metadata": {
          "uid": "csc30ef8fdc0b190fe"
        },
        "multi_line": "Variant 1 Multi"
      }
    ],
    "_variant": {
      
      "_order": [
        {
          "group": [
            "base.cs5bafacf1e94ff8c2",
            "base.csc30ef8fdc0b190fe"
          ]
        }
      ]
    }
  }
}
Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
{
    "entry": {
        "uid": "blt**************a1",
        "_variant": {
            "_change_set": [
                "title",
                "url",
                "single_line",
                "group.cs5bafacf1e94ff8c2.single_line",
                "group.cs5bafacf1e94ff8c2.multi_line",
                "group.csc30ef8fdc0b190fe.single_line",
                "group.csc30ef8fdc0b190fe.multi_line"
            ],
            "_order": [
                {
                    "group": [
                        "base.cs5bafacf1e94ff8c2",
                        "base.csc30ef8fdc0b190fe"
                    ]
                }
            ],
            "_instance_uid": "blt**************d5",
            "_uid": "cs1**************02",
            "_base_entry_version": 1
        },
        "_version": 3,
        "created_at": "2024-09-06T13:30:23.305Z",
        "created_by": "blt**************1a",
        "group": [
            {
                "single_line": "Variant 2",
                "_metadata": {
                    "uid": "cs5bafacf1e94ff8c2"
                },
                "multi_line": "Variant 2 Multi"
            },
            {
                "single_line": "Variant 1",
                "_metadata": {
                    "uid": "csc30ef8fdc0b190fe"
                },
                "multi_line": "Variant 1 Multi"
            }
        ],
        "locale": "en-us",
        "single_line": "Red variant",
        "tags": [],
        "title": "red",
        "updated_at": "2024-09-06T13:32:50.403Z",
        "updated_by": "blt**************1a",
        "url": "/red"
    },
    "notice": "Entry variant created successfully."
}

Update entry variant

PUThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/variants/{variant_uid}

The Update entry variant request lets you update an entry variant of your existing base entry.

NoteYou must have variant groups linked to relevant content type(s). If you have not linked your content types to a variant group yet, refer to the Link Content Type request.

In the “Body” section, include only the fields that require updating for the entry variant. The system detects changes automatically based on the values provided. All other fields inherit their values from the base entry. For Group and Modular Blocks fields with multiple instances, use the _order property to define the preferred sequence of instance UIDs.

   {
   {
  "entry": {
    "title": "red",
    "url": "/red",
    "single_line": "Red variant",
    "group": [
      {
        "single_line": "Variant 2",
        "_metadata": {
          "uid": "cs5bafacf1e94ff8c2"
        },
        "multi_line": "Variant 2 Multi"
      },
      {
        "single_line": "Variant 1",
        "_metadata": {
          "uid": "csc30ef8fdc0b190fe"
        },
        "multi_line": "Variant 1 Multi"
      }
    ],
    "_variant": {
      
      "_order": [
        {
          "group": [
            "base.cs5bafacf1e94ff8c2",
            "base.csc30ef8fdc0b190fe"
          ]
        }
      ]
    }
  }
}

Note:

  • The _change_set field is automatically included in the response to indicate which fields were updated in the entry variant.
  • The system also detects changes in nested fields and includes them in the _change_set field of the response.
Sample Request
12345678910111213141516171819202122232425262728293031323334
{
  "entry": {
    "title": "red",
    "url": "/red",
    "single_line": "Red variant",
    "group": [
      {
        "single_line": "Variant 2",
        "_metadata": {
          "uid": "cs5bafacf1e94ff8c2"
        },
        "multi_line": "Variant 2 Multi"
      },
      {
        "single_line": "Variant 1",
        "_metadata": {
          "uid": "csc30ef8fdc0b190fe"
        },
        "multi_line": "Variant 1 Multi"
      }
    ],
    "_variant": {
      
      "_order": [
        {
          "group": [
            "base.cs5bafacf1e94ff8c2",
            "base.csc30ef8fdc0b190fe"
          ]
        }
      ]
    }
  }
}
Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
{
    "entry": {
        "uid": "blt**************a1",
        "_variant": {
            "_change_set": [
                "title",
                "url",
                "single_line",
                "group.cs5bafacf1e94ff8c2.single_line",
                "group.cs5bafacf1e94ff8c2.multi_line",
                "group.csc30ef8fdc0b190fe.single_line",
                "group.csc30ef8fdc0b190fe.multi_line"
            ],
            "_order": [
                {
                    "group": [
                        "base.cs5bafacf1e94ff8c2",
                        "base.csc30ef8fdc0b190fe"
                    ]
                }
            ],
            "_instance_uid": "blt**************d5",
            "_uid": "cs1**************02",
            "_base_entry_version": 1
        },
        "_version": 3,
        "created_at": "2024-09-06T13:30:23.305Z",
        "created_by": "blt**************1a",
        "group": [
            {
                "single_line": "Variant 2",
                "_metadata": {
                    "uid": "cs5bafacf1e94ff8c2"
                },
                "multi_line": "Variant 2 Multi"
            },
            {
                "single_line": "Variant 1",
                "_metadata": {
                    "uid": "csc30ef8fdc0b190fe"
                },
                "multi_line": "Variant 1 Multi"
            }
        ],
        "locale": "en-us",
        "single_line": "Red variant",
        "tags": [],
        "title": "red",
        "updated_at": "2024-09-06T13:32:50.403Z",
        "updated_by": "blt**************1a",
        "url": "/red"
    },
    "notice": "Entry variant updated successfully."
}

Get all entry variants

GEThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/variants

The Get all entry variants request retrieves all entry variants of the specified entry.

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
{
    "entries": [
        {
            "uid": "blt**************a1",
            "_variant": {
                "_change_set": [
                    "title",
                    "url",
                    "single_line",
                    "group.cs5bafacf1e94ff8c2.single_line",
                    "group.cs5bafacf1e94ff8c2.multi_line",
                    "group.csc30ef8fdc0b190fe.single_line",
                    "group.csc30ef8fdc0b190fe.multi_line"
                ],
                "_order": [
                    {
                        "group": [
                            "base.cs5bafacf1e94ff8c2",
                            "base.csc30ef8fdc0b190fe"
                        ]
                    }
                ],
                "_instance_uid": "blta9cc89a57108129246d5",
                "_uid": "3439b92ff6b5406ab559e7e7f246a49b",
                "_base_entry_version": 1
            },
            "_version": 1,
            "created_at": "2024-09-09T10:28:46.093Z",
            "created_by": "blt6fe92749b66ad81a",
            "group": [
                {
                    "single_line": "Variant 2",
                    "_metadata": {
                        "uid": "cs5bafacf1e94ff8c2"
                    },
                    "multi_line": "Variant 2 Multi"
                },
                {
                    "single_line": "Variant 1",
                    "_metadata": {
                        "uid": "csc30ef8fdc0b190fe"
                    },
                    "multi_line": "Variant 1 Multi"
                }
            ],
            "locale": "en-us",
            "single_line": "Green Variant",
            "tags": [],
            "title": "Green RD",
            "updated_at": "2024-09-09T10:28:46.093Z",
            "updated_by": "blt6fe92749b66ad81a",
            "url": "/green"
        },
        {
            "uid": "blt05097f3d980a17a1",
            "_variant": {
                "_change_set": [
                    "title",
                    "url",
                    "single_line"
                ],
                "_order": [],
                "_instance_uid": "blta9cc89a57108129246d5",
                "_uid": "3439b92ff6b5406ab559e7e7f246a49c",
                "_base_entry_version": 1
            },
            "_version": 4,
            "created_at": "2024-09-06T13:30:23.305Z",
            "created_by": "blt**************1a",
            "locale": "en-us",
            "single_line": "Red variant",
            "tags": [],
            "title": "red",
            "updated_at": "2024-09-09T10:27:44.796Z",
            "updated_by": "blt**************1a",
            "url": "/red"
        }
    ]
}

Get single entry variant

GEThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/variants/{variant_uid}

The Get single entry variant request retrieves a single variant entry of a given base entry.

Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
{
    "entry": {
        "uid": "blt**************a1",
        "_variant": {
            "_change_set": [
                "title",
                "url",
                "single_line",
                "group.cs5bafacf1e94ff8c2.single_line",
                "group.cs5bafacf1e94ff8c2.multi_line",
                "group.csc30ef8fdc0b190fe.single_line",
                "group.csc30ef8fdc0b190fe.multi_line"
            ],
            "_order": [
                {
                    "group": [
                        "base.cs5bafacf1e94ff8c2",
                        "base.csc30ef8fdc0b190fe"
                    ]
                }
            ],
            "_instance_uid": "blta9cc89a57108129246d5",
            "_uid": "3439b92ff6b5406ab559e7e7f246a49b",
            "_base_entry_version": 1
        },
        "_version": 1,
        "created_at": "2024-09-09T10:28:46.093Z",
        "created_by": "blt**************1a",
            "group": [
                {
                    "single_line": "Variant 2",
                    "_metadata": {
                        "uid": "cs5bafacf1e94ff8c2"
                    },
                    "multi_line": "Variant 2 Multi"
                },
                {
                    "single_line": "Variant 1",
                    "_metadata": {
                        "uid": "csc30ef8fdc0b190fe"
                    },
                    "multi_line": "Variant 1 Multi"
                }
            ],
        "locale": "en-us",
        "single_line": "Green Variant",
        "tags": [],
        "title": "Green RD",
        "updated_at": "2024-09-09T10:28:46.093Z",
        "updated_by": "blt**************1a",
        "url": "/green"
    }
}

Delete entry variant

DELETEhttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/variants/{variant_uid}

The Delete entry variant request lets you delete an entry variant.

Sample Response
Status|200 OK
123
{
    "notice": "Entry variant deleted successfully."
}

Publish entry variant

POSThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/publish

The Publish entry variant request lets you publish an entry variant.

In the “Body” section, include the variant UID and version within variants. Pass the publish_latest_base_conditionally key as true within variant_rules.

        "variants": [
{
"uid": "cs6**************a5",
"version": 1
}
],
"variant_rules": {
"publish_latest_base_conditionally": true
}

NoteYou don't need to include the base entry version in the payload. The entry variant will be published based on the latest version or as specified by the variant_rules toggle. If the base entry version is included, the system will ignore it.

Sample Request
1234567891011121314151617
{
    "entry": {
        "environments": ["production"],
        "locales": ["en-us"],
        "variants": [
            {
                "uid": "cs6**************a5",
                "version": 1
            }
        ],
        "variant_rules": {
            "publish_latest_base": false,
            "publish_latest_base_conditionally": true
        }
    },
    "locale": "en-us"
}
Sample Response
Status|201 Created
1234
{
    "notice": "The requested action has been performed.",
    "job_id": "75****1f-e**0-46**-a**5-02********9a"
}

Unpublish entry variant

POSThttps://api.contentstack.io/v3/content_types/{content_type_uid}/entries/{entry_uid}/unpublish

The Unpublish entry variant request lets you unpublish an entry variant.

In the “Body” section, include the version number and variant UID within variants.

        "variants": [
{
"uid": "cs6**************a5",
"version": 1
}
]

NoteYou don't need to include the base entry version in the payload. The entry variant will be unpublished based on the latest version or as specified by the variant_rules toggle. If the base entry version is included, the system will ignore it.

Sample Request
12345678910111213
{
    "entry": {
        "environments": ["blt**************fd"],
        "locales": ["en-us"],
        "variants": [
            {
                "uid": "cs6**************a5",
                "version": 1
            }
        ]
    },
    "locale": "en-us"
}
Sample Response
Status|201 Created
1234
{
    "notice": "The requested action has been performed.",
    "job_id": "05****9c-9**0-45**-9**4-ea********37"
}
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid
variant_uidrequiredstring

Enter the unique ID of your variant.

Example:

your_variant_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us

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

Pass application/json value.

Example:

application/json
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid
variant_uidrequiredstring

Enter the unique ID of your variant.

Example:

your_variant_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us

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

Pass application/json value.

Example:

application/json
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us
include_workflowoptionalstring

Enter “true” to include the workflow details of the entry.

Example:

true
include_publish_detailsoptionalstring

Enter “true” to include the publish details of the entry.

Example:

true
include_rulesoptionalstring

Enter “true” to include the publishing rules for the entry.

Example:

true
skipoptionalstring

Enter the number of items to be skipped from the response body.

Example:

0
limitoptionalstring

Enter the maximum number of items to be returned.

Example:

10

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
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid
variant_uidrequiredstring

Enter the unique ID of your variant.

Example:

your_variant_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us
include_workflowoptionalstring

Enter “true” to include the workflow details of the entry.

Example:

true
include_publish_detailsoptionalstring

Enter “true” to include the publish details of the entry.

Example:

true
include_rulesoptionalstring

Enter “true” to include the publishing rules for the entry.

Example:

true

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
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid
variant_uidrequiredstring

Enter the unique ID of your variant.

Example:

your_variant_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us

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
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us

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

Pass application/json value.

Example:

application/json
api_versionrequiredstring

Enter the API version to include Nested Reference Publishing.

Example:

3.2
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

content_type_uidrequiredstring

Enter the unique ID of your content type.

Example:

your_content_type_uid
entry_uidrequiredstring

Enter the unique ID of your entry.

Example:

your_entry_uid

Query Parameters

localeoptionalstring

Enter the code of the language for the entry you want to update.

Example:

en-us

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

Pass application/json value.

Example:

application/json
api_versionrequiredstring

Enter the API version to include Nested Reference Publishing.

Example:

3.2
branchoptionalstring

Enter your branch unique ID.

Example:

main