> ## 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.

# Update a playlist item

> Updates the title, lesson label, duration, or thumbnail recorded for one item in a playlist. Every field is optional: send only what you want to change.

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



## OpenAPI

````yaml /api-reference/openapi.json patch /playlists/{playlist}/videos/{video}
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:
  /playlists/{playlist}/videos/{video}:
    patch:
      tags:
        - Playlists
      summary: Update a playlist item
      description: >-
        Updates the title, lesson label, duration, or thumbnail recorded for one
        item in a playlist. Every field is optional: send only what you want to
        change.


        Requires a token with the `videos:write` scope.
      operationId: updatePlaylistVideo
      parameters:
        - name: playlist
          in: path
          required: true
          schema:
            type: integer
          description: >-
            The numeric ID of the video the playlist lives on. A playlist has no
            ID of its own: it is settings stored on a video row, so this is that
            video's `id`, the same value you would pass to `GET
            /videos/{video}`.
        - name: video
          in: path
          required: true
          schema:
            type: string
          description: >-
            Despite the parameter name, this is the item's `video_code`, not a
            numeric ID. Playlist items are addressed by video code, because a
            playlist item has no ID of its own either.
        - 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/PlaylistItemUpdateRequest'
      responses:
        '200':
          description: The playlist's full item list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaylistItemsResponse'
        '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'
        '404':
          description: >-
            `NOT_FOUND`: no item with that video code exists in this playlist.
            This 404 can also mean the video hosting the playlist itself was not
            found, in which case the body carries Laravel's default not-found
            shape instead.
          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:
    PlaylistItemUpdateRequest:
      type: object
      description: Every field is optional. Send only what you want to change.
      properties:
        title:
          type: string
          maxLength: 255
        lesson_label:
          type: string
          maxLength: 255
        duration_s:
          type: integer
          minimum: 0
        thumb_url:
          type: string
          format: uri
          maxLength: 2048
    PlaylistItemsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlaylistItem'
        total:
          type: integer
          description: Only present on `GET /playlists/{playlist}/videos`.
    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
    PlaylistItem:
      type: object
      properties:
        video_code:
          type: string
          description: >-
            The item's video code. This is the key every item operation
            addresses it by: there is no numeric item ID.
        title:
          type: string
        lesson_label:
          type: string
        duration_s:
          type: integer
        thumb_url:
          type: string
  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.