# Branches

A branch is an isolated workspace that contains its own set of content types, content items, and media. Every branch is created from the `main` branch and maintains a connection to it. This lets you experiment without impacting the original content repository. When you change the items in one branch, it does not affect the other branches or the `main` branch.

## Delete a branch

 - [DELETE /api/v2/cm/branches/{branchId}](https://api-docs.sitecore.com/sai/xm-cloud-content/content-management-api/branches/branchdelete.md): Deletes a branch with a specific ID. Deleting a branch does not affect the main branch.

## Retrieve a branch by its ID

 - [GET /api/v2/cm/branches/{branchId}](https://api-docs.sitecore.com/sai/xm-cloud-content/content-management-api/branches/environmentbyid.md): Retrieves a branch using its ID.

## Update a branch

 - [PUT /api/v2/cm/branches/{branchId}](https://api-docs.sitecore.com/sai/xm-cloud-content/content-management-api/branches/environmentupdate.md): Updates the details associated with a branch with a specific ID.

## Retrieve all branches

 - [GET /api/v2/cm/branches](https://api-docs.sitecore.com/sai/xm-cloud-content/content-management-api/branches/allenvironments.md): Lists all available branches.

## Create a branch

 - [POST /api/v2/cm/branches](https://api-docs.sitecore.com/sai/xm-cloud-content/content-management-api/branches/addenvironment.md): Creates a new branch. {% admonition type="info" name="Note"%}Branch names must be unique. A maximum of five branches per tenant is supported.{% /admonition %}

