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

# Change subtitle

> Method to update subtitle of a video. 

You can update all or only some of fields you need.

If you want to replace the text of subtitles (i.e. found a typo in the text, or the timing in the video changed), then:
- download it using GET method,
- change it in an external editor,
- and update it using this PATCH method.

Just like videos, subtitles are cached, so it takes time to update the data. See POST method for details.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/streaming_api.yaml patch /streaming/videos/{video_id}/subtitles/{id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Streaming API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: a41613cd4a9e
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: AI
  - name: Broadcasts
  - name: Directories
  - name: Overlays
  - name: Players
  - name: Playlists
  - name: QualitySets
  - name: Restreams
  - name: Statistics
  - name: Streams
  - name: Subtitles
  - name: Videos
paths:
  /streaming/videos/{video_id}/subtitles/{id}:
    patch:
      tags:
        - Subtitles
      summary: Change subtitle
      description: >-
        Method to update subtitle of a video. 


        You can update all or only some of fields you need.


        If you want to replace the text of subtitles (i.e. found a typo in the
        text, or the timing in the video changed), then:

        - download it using GET method,

        - change it in an external editor,

        - and update it using this PATCH method.


        Just like videos, subtitles are cached, so it takes time to update the
        data. See POST method for details.
      operationId: patch_api_videos_video_id_subtitles_id
      parameters:
        - name: id
          in: path
          description: ID of a subtitle
          required: true
          schema:
            type: integer
        - name: video_id
          in: path
          description: ID of a video
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/subtitleBodyPatch'
        required: true
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subtitlePatched'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notfound'
        '422':
          description: One or more parameters were specified incorrectly, check the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subtitleerror422'
components:
  schemas:
    subtitleBodyPatch:
      allOf:
        - $ref: '#/components/schemas/subtitleBase'
        - example:
            language: ltz
    subtitlePatched:
      allOf:
        - $ref: '#/components/schemas/subtitleBase'
        - example:
            name: German (AI-generated)
            language: ltz
            vtt: >-
              WEBVTT 1 00:00:07.154 --> 00:00:12.736 Wir haben 100 Millionen
              registrierte Benutzer oder aktive Benutzer, die mindestens einmal
              pro Woche spielen.

              2 00:00:13.236 --> 00:00:20.198 Wir haben vielleicht 80 oder
              100.000, die auf einem bestimmten Cluster spielen.
    notfound:
      allOf:
        - $ref: '#/components/schemas/badrequest'
        - example:
            status: 404
            error: >-
              Not Found. Entity you are looking for was not found, please check
              the initial parameters
    subtitleerror422:
      allOf:
        - $ref: '#/components/schemas/badrequest'
        - example:
            status: 422
            error: Unprocessable Entity. Language code is not recognized.
    subtitleBase:
      type: object
      properties:
        name:
          type: string
          description: Name of subtitle file
        language:
          type: string
          description: 3-letter language code according to ISO-639-2 (bibliographic code)
        vtt:
          type: string
          description: >-
            Full text of subtitles/captions, with escaped "\n" ("\r") symbol of
            new line
      example: null
    badrequest:
      type: object
      properties:
        status:
          type: integer
          description: Error number
        error:
          type: string
          description: Error message
      example:
        status: 400
        error: >-
          Bad Request response status code indicates that the server cannot or
          will not process the request due to something that is perceived to be
          a client error (for example, malformed request syntax, invalid request
          message framing, or deceptive request routing).
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````