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

# Extensions

## Extensions

Extensions let you create custom fields and widgets to customize Contentstack default UI and behavior.

You can now pass the branch header in the API request to fetch or manage modules located within specific branches of the stack. Additionally, you can also set the include\_branch query parameter to true to include the \_branch top-level key in the response. This key specifies the unique ID of the branch where the concerned Contentstack module resides.

## uploadCustomField

The "Upload a custom field" request is used to upload a custom field to Contentstack.

Select the HTML file of the custom field that you want to upload.

Enter the title of the custom field that you want to upload.

Enter the data type for the input field of the custom field.

Enter the tags that you want to assign to the custom field.

Enter ‘true’ if you want your custom field to store multiple values.

Enter the type as ‘field’ since this is a custom field extension.

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Extensions extension = contntstack.stack().extensions();
extension.uploadCustomField(body);
```

The request body.

## update

The "Update Extensions call" will update the details of a custom field.

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

The request body to update the Extension.

## removeParam

Set header for the request.

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Extensions extension = contentstack.stack().extensions();
extension.removeParam("key");
```

Removes query parameters using the key of the request.

## find

The "Get all custom fields" request is used to get the information of all custom fields created in a stack.

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

## addParam

Sets header for the request.

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Extensions extension = contentstack.stack().extensions();
extension.addParam("key", value);
```

Query parameter key for the request.

Query parameter value for the request.

## fetch

The "Fetch" request returns information about a specific extension.

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

## delete

The "Delete custom field" request deletes a specific custom field.

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

## addHeader

Sets header for the request.

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Extensions extension = contentstack.stack().extensions();
extension.addHeader("key", value);
```

Header key for the request.

Header value for the request.

## Extensions | Java Management SDK | Contentstack

Extensions let you build custom fields and widgets to tailor the Contentstack UI and behavior in the Java Management SDK.