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

# Idempotently add or remove up to 100 watchlist items



## OpenAPI

````yaml /openapi.yaml post /api/platform/v1/sync/watchlist
openapi: 3.1.0
info:
  title: PunchPlay API
  version: 1.0.0-beta.3
  description: >-
    Complete beta contract for native and third-party clients, plus the stable
    read-only public profile API. OAuth access tokens use explicit per-operation
    scopes.
  summary: Platform and public API surface for PunchPlay developers.
servers:
  - url: https://punchplay.tv
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Authentication
  - name: Profile
  - name: Titles
  - name: History
  - name: Ratings
  - name: Lists
  - name: Collection
  - name: Playback
  - name: Calendar
  - name: Community
  - name: Notifications
  - name: Trophies
  - name: Public Catalog
  - name: Public Users
paths:
  /api/platform/v1/sync/watchlist:
    post:
      tags:
        - Sync
      summary: Idempotently add or remove up to 100 watchlist items
      operationId: bulkSyncWatchlist
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        $ref: '#/components/requestBodies/BulkWatchlist'
      responses:
        '200':
          $ref: '#/components/responses/BulkMutationSuccess'
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '408':
          $ref: '#/components/responses/ApiError'
        '409':
          $ref: '#/components/responses/ApiError'
        '413':
          $ref: '#/components/responses/ApiError'
        '429':
          $ref: '#/components/responses/ApiError'
      security:
        - oauth2:
            - lists:write
components:
  parameters:
    IdempotencyKey:
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 200
  requestBodies:
    BulkWatchlist:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BulkWatchlistInput'
  responses:
    BulkMutationSuccess:
      description: Per-item bulk mutation outcomes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BulkMutationResponse'
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Ceiling of the most constraining bucket for this request.
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Requests remaining in the current window.
        X-RateLimit-Reset:
          schema:
            type: integer
          description: Unix time in seconds when the current window resets.
    ApiError:
      description: API error
      headers:
        X-PunchPlay-Request-Id:
          schema:
            type: string
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Ceiling of the most constraining bucket for this request.
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Requests remaining in the current window.
        X-RateLimit-Reset:
          schema:
            type: integer
          description: Unix time in seconds when the current window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    BulkWatchlistInput:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/BulkWatchlistItem'
      additionalProperties: false
    BulkMutationResponse:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/BulkMutationResult'
        inserted:
          type: integer
          minimum: 0
        updated:
          type: integer
          minimum: 0
        removed:
          type: integer
          minimum: 0
        skipped:
          type: integer
          minimum: 0
        invalid:
          type: integer
          minimum: 0
        idempotency_replayed:
          type: boolean
      additionalProperties: false
    ApiError:
      type: object
      required:
        - error
        - message
        - request_id
      properties:
        error:
          type: string
        message:
          type: string
        request_id:
          type:
            - string
            - 'null'
        required_scope:
          type: string
      additionalProperties: true
    BulkWatchlistItem:
      type: object
      required:
        - kind
        - tmdb_id
        - title
      properties:
        client_item_id:
          type: string
          maxLength: 200
        kind:
          type: string
          enum:
            - movie
            - show
        tmdb_id:
          type: integer
          minimum: 1
        title:
          type: string
          minLength: 1
          maxLength: 500
        poster_path:
          type:
            - string
            - 'null'
        is_anime:
          type: boolean
        remove:
          type: boolean
      additionalProperties: false
    BulkMutationResult:
      type: object
      required:
        - client_item_id
        - index
        - status
      properties:
        client_item_id:
          type:
            - string
            - 'null'
        index:
          type: integer
          minimum: 0
        id:
          type: integer
          minimum: 1
        status:
          type: string
          enum:
            - inserted
            - updated
            - removed
            - skipped
            - invalid
        error:
          type: string
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /api/platform/v1/oauth/authorize
          tokenUrl: /api/platform/v1/oauth/token
          scopes:
            profile:read: Read basic profile and title metadata
            history:read: Read watch history
            history:write: Log, edit, and delete watches
            lists:read: Read lists
            lists:write: Create and edit lists
            ratings:read: Read ratings, favourites, and statuses
            ratings:write: Rate, favourite, and change statuses
            collection:read: Read collection items
            collection:write: Add and remove collection items
            notifications:read: Read notifications and notification preferences
            notifications:write: Manage notification read state and preferences
            trophies:read: Read trophy progress
            profile:write: Update profile details and preferences
            playback:read: Read playback and continue-watching state
            playback:write: Update playback state
            events:read: Subscribe to playback events

````