---
title: "Create (or Update) a video in a Campaign"
method: POST
path: "/campaigns/{campaignId}/videos"
tags: ["Videos"]
---

# Create (or Update) a video in a Campaign

`POST /campaigns/{campaignId}/videos`

## Request

- Base URL: `https://api.pitchlane.com/api/public/v1`
- URL: `https://api.pitchlane.com/api/public/v1/campaigns/{campaignId}/videos`
- Auth: API key in header `X-API-Key`

## Path parameters

- `campaignId` string, required

## Request body

- object
  - `queueForRender` boolean: If true, the video will automatically be added to the rendering queue to be rendered (default). If false, the video will be created in Pitchlane but will not be rendered until the "Render all Videos" button is pressed in the Pitchlane UI.
  - `title` string, nullable: The title of the video to create. If not specified, the title will be generated following the campaign's `titleTemplate`.
  - `variables` object, required: A dynamic object containing specific data elements. The full schema can be fetched from [/campaign/{campaignId}/schema](/docs/#/campaigns/get_campaigns__campaignId__schema).
    - `originalData` string, nullable: Specify either `originalData` or `originalRow` to store the original data that was used to create the video.
    - `originalRow` string, nullable: Specify either `originalData` or `originalRow` to store the original data that was used to create the video.
    - `originalRowIndex` integer, nullable: If the video was imported from a CSV, this is the row number where the video data was found.
    - `originalUid` string, nullable: A unique identifier for the video, used to detect duplicates. If not specified, the video will be considered unique.

## Response `200`

Video created successfully

- object: Detailed information about the created video.
  - `id` string: The full ID of the video created.
  - `shortId` string: The short ID of the video created (used in the final video URL).

## Other responses

- `400`: Invalid input data

---

[API](https://skmtc.dev/pitchlane/apis/pitchlane-api.md) · [All operations](https://skmtc.dev/pitchlane/apis/pitchlane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pitchlane/apis/pitchlane-api/revisions/a8d831473a5c?raw)
