---
title: "Alias"
description: "Alias"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/java/reference/alias"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-21"
---

# Alias

## Alias

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.

## addHeader

Sets header for the request

```
import contentstack; 
Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
alias.addHeader("key", value)
```

Header key for the request.

Header value for the request.

## addParam

Sets params for the request.

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
alias.addParam("key", value);
```

Query parameter key for the request.

Query parameter value for the request.

## removeParam

Set header for the request.

```
import contentstack; 
Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
alias.removeParam("key");
```

Removes query parameter using a key of request.

## find

The "Get all aliases" request returns comprehensive information about all the aliases available in a particular stack in your account.

```
import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
Call<ResponseBody> response = alias.find().execute();
if (response.isSuccessful){ 
    System.out.println("Response"+ response) 
}
```

## fetch

The "Get a single alias" request returns information about a specific alias.

```
import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
Call<ResponseBody> response = alias.fetch().execute();
if (response.isSuccessful){ 
    System.out.println("Response"+ response) 
}
```

## update

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.

```
import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
Call<ResponseBody> response = alias.update(body).execute();
if (response.isSuccessful){ 
    System.out.println("Response"+ response) 
}
```

The request body to update the Alias.

## delete

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.

```
import contentstack; 

Contentstack contentstack = new Contentstack.Builder().build();
Alias alias = contentstack.stack().alias();
Call<ResponseBody> response = alias.delete().execute();
if (response.isSuccessful){ 
    System.out.println("Response"+ response) 
}
```

## Alias | Java Management SDK | Contentstack

Alias acts as a pointer to a branch, letting you reference its target branch in frontend code in the Java Management SDK.