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

# Folder

## Folder

## addParam

Sets header for the request.

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

Query parameter key for the request.

Query parameter value for the request.

## delete

The "Delete a folder" call is used to delete an asset folder along with all the assets within that folder.

When executing the API call, provide the parent folder UID.

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

## create

The "Create a folder" call is used to create an asset folder and/or add a parent folder to it (if required).

```
import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Folder folder = contentstack.stack().folder();
Call<ResponseBody> response = folder.create(requestBody).execute();
if (response.isSuccessful) {
    System.out.println("Response" + response);
}
```

The request body to create a delivery token.

## update

The "Update or move folder" request can be used either to update the details of a folder or set the parent folder if you want to move a folder under another folder.

When executing the API request, provide the UID of the folder that you want to move/update.

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

The request body.

## removeParam

Set header for the request.

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

Removes query parameters using the key of the request.

## fetch

The "Get a single folder" call gets the comprehensive details of a specific asset folder using folder UID.

When executing the API call to search for a subfolder, you will need to provide the parent folder UID.

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

## addHeader

Sets header for the request.

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

Header key for the request.

Header value for the request.