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

# POST Captions

> Upload captions for a video



## OpenAPI

````yaml POST /video/{id}/captions
openapi: 3.1.0
info:
  title: PN Player API documentation
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.pnplayer.com/v1/api
security:
  - bearerAuth: []
paths:
  /video/{id}/captions:
    post:
      description: Upload captions for a video
      parameters:
        - name: id
          in: path
          description: ID of video to upload captions for
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Caption file to upload
                srclang:
                  type: string
                  description: Source language of the captions
                label:
                  type: string
                  description: Label for the captions
              required:
                - file
                - srclang
                - label
      responses:
        '200':
          description: Video response with captions uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Success:
      type: object
      properties:
        message:
          type: string
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````