> For the complete documentation index, see [llms.txt](https://docs.thebrief.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thebrief.ai/public-api/rest-api/brand-kits/brand-templates/brand-template-folders.md).

# Brand template folders

### List brand template folders

This endpoint makes an HTTP GET request to retrieve the brand template folders of a brand kit.

#### Request

**Method:** GET\
**Endpoint:** `https://api.thebrief.ai/v1/brandkits/templates/folders`\
**Query parameters:**

* `brandkitId` (integer, **required**): The id of the brand kit.
* `parentId` (integer, optional): Optional filter by parent folder.

{% code overflow="wrap" %}

```
curl --location 'https://api.thebrief.ai/v1/brandkits/templates/folders?brandkitId=123456' \
--header 'Authorization: Bearer eyJ...'
```

{% endcode %}

#### Response

The response will be in JSON format with the following schema:

{% code overflow="wrap" %}

```json
{
    "response": [
        {
            "id": 200,
            "name": "Summer campaign",
            "parentId": null
        }
    ]
}
```

{% endcode %}

***

### Create a brand template folder

This endpoint makes an HTTP POST request to create a new brand template folder in a brand kit.

#### Request

**Method:** POST\
**Endpoint:** `https://api.thebrief.ai/v1/brandkits/templates/folders`\
**Body:**

* `brandkitId` (integer, **required**): The id of the brand kit.
* `name` (string, **required**): The folder display name.

{% code overflow="wrap" %}

```
curl --location 'https://api.thebrief.ai/v1/brandkits/templates/folders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ...' \
--data '{
    "brandkitId": 123456,
    "name": "Summer campaign"
}'
```

{% endcode %}

#### Response

The response will be in JSON format with the following schema:

{% code overflow="wrap" %}

```json
{
    "response": {
        "id": 200,
        "name": "Summer campaign",
        "parentId": null
    }
}
```

{% endcode %}

***

### Rename a brand template folder

This endpoint makes an HTTP PUT request to rename a brand template folder in a brand kit.

#### Request

**Method:** PUT\
**Endpoint:** `https://api.thebrief.ai/v1/brandkits/templates/folders`\
**Body:**

* `brandkitId` (integer, **required**): The id of the brand kit.
* `folderId` (integer, **required**): The id of the folder to rename.
* `name` (string, **required**): The new folder name.

{% code overflow="wrap" %}

```
curl --location --request PUT 'https://api.thebrief.ai/v1/brandkits/templates/folders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ...' \
--data '{
    "brandkitId": 123456,
    "folderId": 200,
    "name": "Winter campaign"
}'
```

{% endcode %}

#### Response

The response will be in JSON format with the following schema:

{% code overflow="wrap" %}

```json
{
    "response": {
        "id": 200,
        "name": "Winter campaign",
        "parentId": null
    }
}
```

{% endcode %}

***

### Delete a brand template folder

This endpoint makes an HTTP DELETE request to delete a brand template folder from a brand kit.

#### Request

**Method:** DELETE\
**Endpoint:** `https://api.thebrief.ai/v1/brandkits/templates/folders`\
**Body:**

* `brandkitId` (integer, **required**): The id of the brand kit.
* `folderId` (integer, **required**): The id of the folder to delete.

{% code overflow="wrap" %}

```
curl --location --request DELETE 'https://api.thebrief.ai/v1/brandkits/templates/folders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ...' \
--data '{
    "brandkitId": 123456,
    "folderId": 200
}'
```

{% endcode %}

#### Response

The response will be in JSON format with the following schema:

{% code overflow="wrap" %}

```json
{
    "response": {
        "success": true
    }
}
```

{% endcode %}

***
