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

# Upload Subtitle File

## Description

Multipart upload that writes subtitles (`srt`) or captions (`vtt`) to the expected S3 key for the media (`upload_subtitle_file`). The uploaded filename extension must match `file_type`.


## OpenAPI

````yaml put /v1/videos/{video_id}/preview/{file_type}
openapi: 3.1.0
info:
  title: Lingopal VOD API
  description: API for Video on Demand processing, transcription, and translation services
  version: 0.0.1
servers:
  - url: https://api.lingopal.ai
security: []
paths:
  /v1/videos/{video_id}/preview/{file_type}:
    put:
      tags:
        - videos
      summary: Upload Subtitle File
      operationId: upload_subtitle_file_v1_videos__video_id__preview__file_type__put
      parameters:
        - name: video_id
          in: path
          required: true
          schema:
            type: string
            title: Video Id
        - name: file_type
          in: path
          required: true
          schema:
            enum:
              - srt
              - vtt
            type: string
            title: File Type
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_subtitle_file_v1_videos__video_id__preview__file_type__put
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                message: File uploaded successfully
        '400':
          content:
            application/json:
              example:
                detail: Unsupported file type for upload
          description: Bad Request
        '404':
          content:
            application/json:
              example:
                detail: Video Not Found
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_upload_subtitle_file_v1_videos__video_id__preview__file_type__put:
      properties:
        file:
          type: string
          format: binary
          title: File
        language:
          type: string
          title: Language
          default: source
      type: object
      required:
        - file
      title: Body_upload_subtitle_file_v1_videos__video_id__preview__file_type__put
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````