Get inspired at ContentCon Europe. See the agenda and register for free.
Get inspired at ContentCon Europe. See the agenda and register for free.
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

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.
/
  1. Home
  2. APIs
  3. Content Management API
  4. Aliases

Aliases

markdownView as Markdown

An alias acts as a pointer to a particular branch. You can specify the alias ID in your frontend code to pull content from the target branch associated with an alias.

Get all aliases

GEThttps://api.contentstack.io/v3/stacks/branch_aliases?limit={limit_value}&skip={skip_value}&include_count={boolean_value}

The Get all aliases request returns comprehensive information of all the aliases available in a particular stack in your account.
To configure the permissions for your application via OAuth, please include the cm.branch-aliases.management:read scope.

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334
{
    "branch_aliases": [
        {
            "uid": "development",
            "source": "main",
            "created_by": "blta7eaf6883dd73a0b",
            "updated_by": "blta7eaf6883dd73a0b",
            "created_at": "2021-07-26T10:16:07.248Z",
            "updated_at": "2021-07-26T10:16:09.536Z",
            "deleted_at": false,
            "alias": "release"
        },
        {
            "uid": "development",
            "source": "main",
            "created_by": "blta7eaf6883dd73a0b",
            "updated_by": "blta7eaf6883dd73a0b",
            "created_at": "2021-07-26T10:16:07.248Z",
            "updated_at": "2021-07-26T10:16:09.536Z",
            "deleted_at": false,
            "alias": "dev"
        },
        {
            "uid": "main",
            "source": "",
            "created_by": "blta7eaf6883dd73a0b",
            "updated_by": "blta7eaf6883dd73a0b",
            "created_at": "2021-07-26T10:04:20.752Z",
            "updated_at": "2021-07-26T10:04:20.752Z",
            "deleted_at": false,
            "alias": "sample_alias"
        }
    ]
}

Get a single alias

GEThttps://api.contentstack.io/v3/stacks/branch_aliases/{branch_alias_uid}

The Get a single alias request returns information of a specific alias.
To configure the permissions for your application via OAuth, please include the cm.branch-aliases.management:read scope.

Sample Response
Status|200 OK
123456789101112
{
    "branch_alias": {
        "uid": "dev",
        "source": "main",
        "created_by": "blta7eaf6883dd73a0b",
        "updated_by": "blta7eaf6883dd73a0b",
        "created_at": "2021-07-26T10:16:07.248Z",
        "updated_at": "2021-07-26T10:16:09.536Z",
        "deleted_at": false,
        "alias": "sample_alias"
    }
}

Assign an alias

PUThttps://api.contentstack.io/v3/stacks/branch_aliases/{branch_alias_uid}

The Assign an alias request creates a new alias in a particular stack of your organization. This alias can point to any existing branch (target branch) of your stack.

Note Only stack owners, admins, and developers can assign a new alias to a branch. You must only use the authtoken to assign an alias.

Sample Request
12345
{
    "branch_alias": {
        "target_branch": "test"
    }
}
Sample Response
Status|200 OK
12345678910111213
{
    "notice": "Branch alias assigned successfully.",
    "branch_alias": {
        "uid": "test",
        "source": "main",
        "created_by": "blta7eaf6883dd73a0b",
        "updated_by": "blta7eaf6883dd73a0b",
        "created_at": "2021-07-27T12:45:39.690Z",
        "updated_at": "2021-07-27T12:45:40.241Z",
        "deleted_at": false,
        "alias": "sample_alias"
    }
}

Delete an alias

DELETEhttps://api.contentstack.io/v3/stacks/branch_aliases/{branch_alias_uid}?force={boolean_value}

The Delete an alias request deletes an existing alias.

To confirm the deletion of an alias, you need to specify the force=true query parameter.

When executing the API call, in the “URL Parameters” section, provide the UID of your alias.

NoteYou must only use the authtoken to delete an alias.

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

Query Parameters

limitoptionalstring

Enter the maximum number of branches to be returned.

Example:

2
skipoptionalstring

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

Example:

2
include_countoptionalstring

Set this parameter to 'true' to include in response the total count of branches available in a stack.

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

URL Parameters

branch_alias_uidrequiredstring

Enter the unique ID of the alias of which you want to retrieve the details. The UID of an alias is unique across a stack. Execute the Get all aliases call to retrieve the UID of an alias.

Example:

your_branch_alias_uid

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

URL Parameters

branch_alias_uidrequiredstring
Enter the unique ID of the alias you want to assign or update. The UID of an alias is unique across a stack. Execute the Get all aliases call to retrieve the UID of an alias.

Example:

your_branch_alias_uid

Headers

api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key
authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

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

Example:

application/json
Hide Parameters

URL Parameters

branch_alias_uidrequiredstring

Enter the unique ID of the alias that you want to delete. The UID of an alias is unique across a stack. Execute the Get all aliases call to retrieve the UID of an alias.

Example:

your_branch_alias_uid

Query Parameters

forcerequiredstring

Enter 'true' to force delete an alias.

Example:

true

Headers

api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key
authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken