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

# Import File Captions

> Attach an owner-supplied WebVTT caption. It wins over the auto captions.



## OpenAPI

````yaml /openapi/mio-openapi.json put /api/v1/teams/{team_id}/files/{id}/captions
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/files/{id}/captions:
    put:
      tags:
        - media-admin
      summary: Import File Captions
      description: Attach an owner-supplied WebVTT caption. It wins over the auto captions.
      operationId: media_admin.put_media_admin_put_teams_by_team_id_files_by_id_captions
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/FileCaptionsWriteRequest'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FileCaptionResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    FileCaptionsWriteRequest:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/FileCaptionsWriteData'
      required:
        - data
      title: FileCaptionsWriteRequest
      type: object
    FileCaptionResponse:
      description: 'GET may return data: null when the file has no caption track.'
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/FileCaptionResource'
            - type: 'null'
      required:
        - data
      title: FileCaptionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FileCaptionsWriteData:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/FileCaptionsWriteAttributes'
        type:
          const: file_captions
          title: Type
          type: string
      required:
        - type
        - attributes
      title: FileCaptionsWriteData
      type: object
    FileCaptionResource:
      properties:
        attributes:
          $ref: '#/components/schemas/FileCaptionAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          const: file_captions
          default: file_captions
          title: Type
          type: string
      required:
        - id
        - attributes
      title: FileCaptionResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    FileCaptionsWriteAttributes:
      additionalProperties: false
      properties:
        language:
          title: Language
          type: string
        vtt:
          maxLength: 1100000
          title: Vtt
          type: string
      required:
        - language
        - vtt
      title: FileCaptionsWriteAttributes
      type: object
    FileCaptionAttributes:
      additionalProperties: false
      properties:
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        source:
          enum:
            - imported
            - auto
          title: Source
          type: string
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      required:
        - language
        - source
        - url
      title: FileCaptionAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

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