---
agentTools:
  projectIndex: https://elai.readme.io/llms.txt
---

# Apply a brand kit to a video

Applies brand colours and/or a logo from a brand kit to the video.

Scope is controlled by the flags: `applyColors` and `applyLogo` choose what is applied, `allSlides` whether it covers the whole video or just `activeSlideId`. **`persist` decides whether the result is saved** — with `persist` false the modified video is computed and returned without being written, which is how the editor previews the change.

Brand kits are plan-gated; the kit must belong to the caller's workspace.

```curl Request
curl -X POST 'https://apis.elai.io/api/v1/videos/66a1f0c2b7cd13032a9c6002/apply-brandkit' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "brandKitId": "66a1f0c2b7cd13032a9c6500",
  "applyColors": true,
  "applyLogo": true,
  "placement": "topLeft",
  "allSlides": true,
  "persist": true
}'
```

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Elai Public API",
    "version": "1.0",
    "description": "Every endpoint below is served under `https://apis.elai.io/api/v1`.\n\n## Authentication\n\nSend your workspace API token as a bearer token on every request:\n\n```\nAuthorization: Bearer <your-api-token>\n```\n\nGenerate and rotate the token in the Elai web app under **Settings → API**, or through\n`POST /generateToken`. The token is scoped to one **workspace** and authenticates as that\nworkspace's admin user — it is not tied to an individual person, and it carries admin rights\ninside that workspace.\n\nA request with a missing, unknown or revoked token gets a bare `401` with no response body.\n\n> **Organizations on the Unlimited plan cannot use the API.** Their requests are rejected with the\n> same bare `401` as an invalid token, with nothing to distinguish the two. If a valid, freshly\n> generated token returns `401` on every endpoint, check the plan first.\n\n## Errors\n\nFailures carry a JSON body of the shape `{ \"message\": \"...\" }`. Validation failures on the newer\nendpoints may add an `errors` array naming the offending fields. `401` is the exception: it has no\nbody at all.\n\nBoth render endpoints are **fire-and-forget** — they queue work and return immediately, so a\n`200` means \"accepted\", not \"rendered\". Render failures surface only through the `video_error`\nwebhook, never as an HTTP error on the call that started the render.\n\n## Scope\n\nThis reference is generated from the running code rather than maintained by hand, so it cannot\nquietly fall behind the API it describes. It documents 96 operations across the\n`/api/v1` surface.\n\nEndpoints are grouped by subject in the sidebar. If something you need is missing, or an endpoint\ndoes not behave as described here, tell us.\n\n---\n\n_Generated from `chore/web-4760/api-v1-reference-build` at `5289745d` on 2026-09-04._"
  },
  "servers": [
    {
      "url": "https://apis.elai.io/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "SECRET_KEY"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure."
          }
        }
      }
    },
    "parameters": {
      "VideoId": {
        "name": "videoId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Video id (24-char hex ObjectId)."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request was rejected. `message` explains why.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "VideoNotFound": {
        "description": "No video with that id in this workspace.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/videos/{videoId}/apply-brandkit": {
      "post": {
        "tags": [
          "Videos"
        ],
        "summary": "Apply a brand kit to a video",
        "description": "Applies brand colours and/or a logo from a brand kit to the video.\n\nScope is controlled by the flags: `applyColors` and `applyLogo` choose what is applied, `allSlides` whether it covers the whole video or just `activeSlideId`. **`persist` decides whether the result is saved** — with `persist` false the modified video is computed and returned without being written, which is how the editor previews the change.\n\nBrand kits are plan-gated; the kit must belong to the caller's workspace.",
        "parameters": [
          {
            "$ref": "#/components/parameters/VideoId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brandKitId": {
                    "type": "string",
                    "description": "Brand kit to apply. Must belong to this workspace."
                  },
                  "logoId": {
                    "type": "string",
                    "description": "Which logo from the kit to place."
                  },
                  "placement": {
                    "type": "string",
                    "description": "Logo position, e.g. `topLeft`."
                  },
                  "applyLogo": {
                    "type": "boolean",
                    "description": "Place the logo."
                  },
                  "applyColors": {
                    "type": "boolean",
                    "description": "Recolour slide elements."
                  },
                  "allSlides": {
                    "type": "boolean",
                    "description": "Apply to every slide instead of only `activeSlideId`."
                  },
                  "activeSlideId": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "description": "Target slide when `allSlides` is not set."
                  },
                  "isSaveCustomLogoPosition": {
                    "type": "boolean",
                    "description": "Keep a logo position the user dragged by hand."
                  },
                  "isHandleApplyAllClick": {
                    "type": "boolean",
                    "description": "Marks the editor's explicit \"apply to all\" action."
                  },
                  "keepSlideStatus": {
                    "type": "boolean",
                    "description": "Leave slide render statuses untouched instead of invalidating them."
                  },
                  "syncPptxDynamic": {
                    "type": "boolean",
                    "description": "Also update dynamic PPTX-imported elements."
                  },
                  "canvasWidth": {
                    "type": "number",
                    "description": "Canvas width the client is laying out against, for logo scaling."
                  },
                  "persist": {
                    "type": "boolean",
                    "description": "Save the result. When false the change is returned but not written."
                  }
                }
              },
              "example": {
                "brandKitId": "66a1f0c2b7cd13032a9c6500",
                "applyColors": true,
                "applyLogo": true,
                "placement": "topLeft",
                "allSlides": true,
                "persist": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The video with the brand kit applied (saved only when `persist` was true).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "The caller may not edit this video, or brand kits are not available on the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/VideoNotFound"
          }
        },
        "operationId": "apply-brand-kit"
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "Videos",
      "description": "Create, read, update and delete videos, and read their exports, history and player payload."
    }
  ],
  "_id": {
    "buffer": {
      "0": 106,
      "1": 154,
      "2": 229,
      "3": 101,
      "4": 201,
      "5": 178,
      "6": 243,
      "7": 252,
      "8": 223,
      "9": 58,
      "10": 69,
      "11": 151
    }
  }
}
````