# Brand Kits

## List brand kits

This endpoint makes an HTTP GET request to retrieve brand kits.

### Request

* Method: GET
* Endpoint: `https://api.thebrief.ai/v1/brandkits`
* Query Parameters:
  * `keyword` (string, optional):  The keyword to search brand kits.
  * `limit` (integer, optional) :  The maximum number of brand kits to retrieve.
  * `cursor` (string, optional): A cursor for pagination.
  * `orderBy` (enum, optional):  option to order the response results by next fields:&#x20;

    ```typescript
    ID
    NAME
    CREATED_AT
    UPDATED_AT
    ```
  * `orderDirection` (enum, optional): option to order the response by direction:

    ```
    ASC
    DESC
    ```

```bash
curl --location 'https://api.thebrief.ai/v1/brandkits?keyword=api&limit=10' \
--header 'Authorization: Bearer ey...'
```

### Response

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

* `totalCount` (integer) - The total count of brand kits matching the search criteria.
* `nodes` (array) - An array of brand kit nodes.
* `pageInfo` (object) - Information about the pagination, including whether there is a next page and the end cursor.

```json
{
    "response": {
        "totalCount": 0,
        "nodes": [],
        "pageInfo": {
            "hasNextPage": true,
            "endCursor": ""
        }
    }
}
```

## Create brand kit

This endpoint allows you to create a new brand kit.

### Request

* Method: POST
* Endpoint: `https://api.thebrief.ai/v1/brandkits/create`
* Body:
  * `name` (string, required): The name of the brand kit.
  * `brandName` (string, optional): The name of the brand.
  * `website` (string, optional): The website of the brand.
  * `description` (string, optional): The description of the brand.
  * `voice` (string, optional): The voice of the brand.
  * `tone` (array, optional): The tones of the brand.

### Response

The response is a JSON object with the following schema:

```json
{
    "response": {
        "brandKit": {
            "id": number,
            "name": string,
            "website": string,
            "description": string,
            "voice": string,
            "tone": [string],
        }
    }
}
```

## Delete brand kit

This endpoint allows you to delete a brand kit.

### Request

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

{% code title="Request example" %}

```bash
curl --location --request DELETE 'https://api.thebrief.ai/v1/brandkits' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhdXRob3JpemF0aW9uIjoiQmVhcmVyIGV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpwWVhRaU9qRTJPREV4TVRVMU56YzVPRElzSW1Oc2FXVnVkRWxrSWpvaU16QmpaalJsTldRdE1XRmxOQzAwT1RrNExUa3lNV010TVdVMU5qZzJOemd4WW1VeEluMC56WlRDX0ZHZW5FdklRZHhZTlk1cW9OWnlxSEdEOUYtTUtpNm1uV0h6V1NvIiwiYWxnIjoiSFMyNTYifQ.eyJjbGllbnRJZCI6IjZhMzhlYTk3LTEyOWQtNDE3MS04NTljLTU1MzVjOWYzZTRlMSJ9.gWvLWJSqk0bSO78t5xxdYcR08KHAyvQtKCxd0mnlK5U' \
--data '{
    "brandkitId": 123
}'
```

{% endcode %}

### Response

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

## Update brand kit

This endpoint allows you to update the name of a brand kit.

### Request

* Method: `PUT`
* Endpoint: `https://api.thebrief.ai/v1/brandkits`
* Body:
  * `brandkitId` (integer, required): The brandkit ID
  * `name` (string, optional): The new name of the brandkit.
  * `brandName` (string, optional): The name of the brand.
  * `website` (string, optional): The website of the brand.
  * `description` (string, optional): The description of the brand.
  * `voice` (string, optional): The voice of the brand.
  * `tone` (array, optional): The tones of the brand.

### Response

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

```graphql
{
    "response": {
        "brandKit": {
            "id": number,
            "name": string,
            "website": string,
            "description": string,
            "voice": string,
            "tone": [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.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.
