> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackplay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a video

> Creates a new, empty video shell. The video has no playable media until you upload one with the resumable upload protocol or the single-shot upload endpoint.

Pass `copy_from` to clone every option-group setting (style, playback, autoplay, captions, chapters, CTA cards, and the rest) from an existing video in this workspace. Source media is never copied: the new video still needs its own upload.

Fires the `video.created` webhook.

Requires a token with the `videos:write` scope.



## OpenAPI

````yaml /api-reference/openapi.json post /videos
openapi: 3.1.0
info:
  title: TrackPlay API
  description: >-
    Send conversions and events to TrackPlay, and read them back. Authenticated
    with scoped tokens you mint in the dashboard.
  version: 1.0.0
servers:
  - url: https://app.trackplay.io/api/v1
    description: App API. Conversions, videos, webhooks.
  - url: https://e.trackplay.io
    description: Events API. High-volume event ingest.
security:
  - bearerAuth: []
tags:
  - name: Videos
    description: Create, read, update, and delete videos, and read workspace metadata.
  - name: Video settings
    description: Save a settings draft, publish it live, and read or restore past deploys.
  - name: Uploads
    description: >-
      Upload a source video file in one request or in resumable chunks, and poll
      its processing status.
  - name: Captions and chapters
    description: >-
      Manage caption tracks, chapter markers, AI-generated segments, and CTA
      cards on a video.
  - name: Playlists
    description: Group videos into a playlist or course, and manage the videos inside it.
  - name: Webhooks
    description: Subscribe a URL to TrackPlay lifecycle events and test deliveries.
  - name: Zapier
    description: >-
      The REST-hook endpoints Zapier calls to connect a workspace and manage
      triggers.
  - name: Analytics
    description: Read play, retention, event, and conversion analytics for a video.
  - name: Exports
    description: Queue and download bulk analytics exports.
  - name: Conversions
    description: Report a sale or a lead, from your own server or from a browser fallback.
  - name: Events
    description: Send a custom event tied to a viewer's session.
  - name: Identity
    description: Resolve a viewer's identity from the page, with no token required.
paths:
  /videos:
    post:
      tags:
        - Videos
      summary: Create a video
      description: >-
        Creates a new, empty video shell. The video has no playable media until
        you upload one with the resumable upload protocol or the single-shot
        upload endpoint.


        Pass `copy_from` to clone every option-group setting (style, playback,
        autoplay, captions, chapters, CTA cards, and the rest) from an existing
        video in this workspace. Source media is never copied: the new video
        still needs its own upload.


        Fires the `video.created` webhook.


        Requires a token with the `videos:write` scope.
      operationId: createVideo
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Retry-safe key. The first response for a given key is cached for 24
            hours and replayed on a repeat, with `Idempotency-Replayed: true`
            set.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoCreateRequest'
            examples:
              basic:
                value:
                  title: New VSL
                  player_version: v2
      responses:
        '201':
          description: The video was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoEnvelope'
        '401':
          description: >-
            `AUTH_REQUIRED`: no token sent. `INVALID_TOKEN`: the token is
            invalid, expired, or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: '`INSUFFICIENT_SCOPE`: the token does not carry `videos:write`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '429':
          description: Rate limited. 60 requests per minute per token.
components:
  schemas:
    VideoCreateRequest:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          maxLength: 255
          description: The video's title. Required.
        folder_id:
          type: integer
          description: >-
            Places the video in an existing folder of this workspace. Anything
            else is refused with `422 FOLDER_NOT_FOUND`.
        tags:
          type: array
          items:
            type: string
            maxLength: 64
          description: Free-form tags for organizing videos in the dashboard.
        player_version:
          type: string
          enum:
            - v1
            - v2
            - '1'
            - '2'
          description: >-
            Which player build the video uses. Defaults to the workspace's
            default new-video version.
        copy_from:
          type: integer
          description: >-
            Copy every option-group column and the player version from another
            video in this workspace. The new video still needs its own upload:
            source media is never copied.
        plain_mode:
          type: boolean
          default: false
          description: >-
            `true` makes the video a silent looping clip with no overlays,
            prompts or controls. See the Plain mode guide.
    VideoEnvelope:
      type: object
      properties:
        video:
          $ref: '#/components/schemas/Video'
    ApiError:
      type: object
      description: The error shape the app API returns on a failed read or export.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                A stable error code, e.g. `INSUFFICIENT_SCOPE`,
                `VIDEO_NOT_FOUND`, `EXPORT_NOT_FOUND`.
            message:
              type: string
              description: What went wrong, in plain English.
    ValidationError:
      type: object
      description: >-
        Laravel's default validation-failure body. `errors` maps each invalid
        field to its list of messages.
      properties:
        message:
          type: string
          examples:
            - The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    Video:
      type: object
      description: >-
        A video and its settings. A video carries around thirty option-group
        columns (style, playback, autoplay, captions, chapters, CTA cards,
        playlist, and more) that are not itemized here. Read `GET
        /videos/{video}/settings` for the full set, or the dedicated endpoint
        for the group you care about (captions, chapters, AI segments, CTA
        cards).
      additionalProperties: true
      properties:
        id:
          type: integer
          description: The video's numeric ID.
        code:
          type: string
          description: >-
            The video's public code, used in `video_code` fields across the API
            and in conversions and events.
        title:
          type: string
        workspace_id:
          type: integer
        folder_id:
          type:
            - integer
            - 'null'
        tags:
          type: array
          items:
            type: string
        player_version:
          type: string
          examples:
            - v2
        landscape_hls:
          type:
            - string
            - 'null'
          description: >-
            The landscape HLS manifest URL, once an upload has completed for
            that orientation.
        portrait_hls:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A scoped token minted in **Settings → API tokens**. Send it as
        `Authorization: Bearer tplt_…` or `X-API-Key: tplt_…`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.