---
title: "BranchAlias"
description: "BranchAlias"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/javascript/reference/branchalias"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-13"
---

# BranchAlias

## BranchAlias

Branches efficiently present independent workspaces where developers and content managers can work parallely on content models and content. It helps sync the development activities of websites.

A branch [alias](/docs/headless-cms/about-aliases/) is a custom name given to a specific branch in a stack to make referencing easier, especially when working with multiple branches.

## createOrUpdate

The Create or Update BranchAlias call lets you update the name of an existing BranchAlias.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.stack({ api_key: 'api_key'})
.branchAlias('branch_alias_id')
.createOrUpdate('branch_uid')
.then((branch) => {
 branch.name = 'new_branch_name'
 return branch.update()
})
.then((branch) => console.log(branch))
```

## delete

The Delete BranchAlias call is used to delete an existing BranchAlias permanently from your Stack.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.stack({ api_key: 'api_key'}).branchAlias('uid')
.delete()
.then((response) => console.log(response.notice))
```

## fetch

The fetch BranchAlias call fetches BranchAlias details.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.stack({ api_key: 'api_key'}).branchAlias('branch_alias_id')
.fetch()
.then((branch) => console.log(branch))
```

## fetchAll

The Get all BranchAlias request retrieves the details of all the Branch of a stack.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.stack({ api_key: 'api_key'}).branchAlias()
.fetchAll()
.then((collection) => console.log(collection))
```

The limit parameter will return a specific number of Branch in the output.

The skip parameter will skip a specific number of Branch in the output.

To retrieve the count of Branch.

## BranchAlias | JavaScript Management SDK | Contentstack

BranchAlias is a custom name given to a branch to make referencing easier when working with multiple branches in the JavaScript Management SDK.