> 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-kit-assets.md).

# Brand kit assets

## List brand kit assets

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

### Request

* Method: GET
* Endpoint: `https://api.thebrief.ai/v1/brandkit/{brandkitId}/assets`
* Query Params:
  * `first` (integer, optional): Limit the number of brandkit assets returned.
  * `cursor`  (string, optional): Cursor used for pagination.
  * `parentId` :  (integer, optional): The parent folder id if you want to limit the query for assets only in this folder.
  * `search`  (string, optional): Search keyword for the brandkit assets.
  * `mediaFormat`:  (enum, optional): Filter by media format. A possible value could be <br>

    ```typescript
    jpg
    png
    swf
    gif
    svg
    wav
    ogg
    mpeg
    mp4
    mp3
    webm
    mov
    mkv
    avi
    ```
  * `mediaType`  (enum, optional): Filter by media type. A possible value could be<br>

    ```typescript
    IMAGE
    VIDEO
    AUDIO
    ```

```
curl -X 'GET' \
  'https://api.thebrief.ai/v1/brandkit/{brandkitId}/assets?first=5' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer eyJ...'
```

### Response

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

```json
{
  "response": {
    "id": 734226,
    "name": "Brandkit Name",
    "elements": {
      "nodes": [
        {
          "id": 496163,
          "fileName": "LEGO_logo.svg",
          "type": "IMAGE",
          "format": "svg",
          "checksum": "57bacd0c848bc3271c6d1e1052b82530",
          "createdAt": "2025-01-24T15:06:51.796Z",
          "createdBy": 123863,
          "createdByUser": {
            "id": 123863,
            "name": "User Name"
          }
      ],
      "pageInfo": {
        "endCursor": "eyJjcmVhdGVkQXQiOjE3MzU1NjY1NTAwMzN9",
        "hasNextPage": true
      },
      "totalCount": 48
    }
  }
}
```

## Upload brand kit assets

This endpoint makes an HTTP POST request to upload assets to a brand kit.

### Request

* Method: POST
* Endpoint: `https://api.thebrief.ai/v1/brandkit/uploadAssets`
* Body:
  * `brandkitId` (integer, required): The id of the brand kit.
  * `mediaFolderId` (integer, optional): The id of the media folder inside the brand  kit.
  * `sources` (\[string], required): The source url of the assets.

```
curl --location 'https://api.thebrief.ai/v1/brandkit/uploadAssets' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ...' \
--data '{
    "brandkitId": 123456,
    "mediaFolderId:" 65765,
    "sources": [
         'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/eff1.svg',
         'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/eff2.svg',
    ]
}'

```

Valid media file extensions:&#x20;

* mp3, wav, ogg for audio files
* mp4, mov, avi, webm, mkv for video files
* jpg, jpeg, png, gif, svg for image files

Max sizes for media files: 20 MB for images (1MB for gifs) , 10MB for audio files and 100 MB for video files. Also max duration for video and audio files is set to 5 mins.

For now, we only allow uploading from valid public direct links, but not from google drive, dropbox or other sources.

### Response

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

```json
{
    "response": [
        {
            "id": 494270,
            "hash": "zp1o5x",
            "name": "eff1",
            "fileName": "eff1.svg",
            "type": "IMAGE",
            "format": "svg",
            "status": "VALID",
            "height": 84,
            "width": 120,
            "size": 370,
            "duration": null,
            "url": null,
            "createdBy": 50,
            "createdByUser": {
                "id": 50,
                "name": "User Name"
            }
        }
    ]
}
```
