# Brand kit colors

## List brand kit color palettes

This endpoint makes an HTTP GET request to list the color palettes of a brand kit.

### Request

* Method: GET
* Endpoint: `https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors`

```
curl -X 'GET' \
  'https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors \
  -H 'Authorization: Bearer eyJ...'
```

### Response

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

```json
{
    "response": {
        "brandKitColorPalettes": [
            {
                "id": number,
                "name": string,
                "colors": [
                    {
                        "name": string | null, 
                        "hex": string
                    }
                ],
             }
         ]
    }
}
```

## Create brand kit color palette

This endpoint allows you to create a color palettes in a brand kit.

### Request

* Method: POST
* Endpoint: `https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors`
* Body:
  * `name` (integer, optional): The name of the color palette.
  * `colors` (array, required): The array of colors in the color palette. (can be an empty array)
    * `name` (string, optional): The name of the color.
    * `hex` (string, required): Hex code of the color

```
  curl -s -X POST \
  'https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors' \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Palette name","colors":[{"hex":"#ffffff","name":"white"},{"hex":"#33FF57"}]}'
```

### Response

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

```json
{
    "response": {
        "id": number,
        "name": string,
        "colors": [
            {
                "name": string | undefined, 
                "hex": string
            }
        ],
     }
}
```

## Delete brand kit color palette

This endpoint allows you to delete a color palette from a brandkit.

### Request

* Method: DELETE
* Endpoint: `https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors`
* Body:
  * `paletteId` (integer, required): The ID of the color palette you want to be deleted.

```
 curl -s -X DELETE \
   'https://api.thebrief.ai/v1/brandkit/1333124/colors' \
   -H "Authorization: Bearer $TOKEN" \
   -H "Content-Type: application/json" \
   -d '{"paletteId":1377221}'
```

### Response

```
{
    "response": 
    {
        "status": "success" 
    }
}    
```

## Update brand kit color palette

This endpoint allows you to update a color palette in a brand kit.

### Request

* Method: PUT
* Endpoint: `https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors`
* Body:
  * `paletteId` (integer, optional): The id of the color palette.
  * `name` (integer, optional): The name of the color palette.
  * `colors` (array, required): The array of colors in the color palette. (can be an empty array)
    * `name` (string, optional): The name of the color.
    * `hex` (string, required): Hex code of the color

```
curl -s -X PUT \
  'https://api.thebrief.ai/v1/brandkit/{brandkitId}/colors' \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"paletteId":11222,"name":"Palette name","colors":[{"hex":"#ffffff","name":"white"}]}'
```

### Response

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

```json
{
    "response": {
        "id": number,
        "name": string,
        "colors": [
            {
                "name": string | undefined, 
                "hex": string
            }
        ],
     }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thebrief.ai/public-api/rest-api/brand-kits/brand-kit-colors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
