---
title: "Updates a subtitle track of a DAM file"
method: PATCH
path: "/dam/files/{file_id}/subtitles/{subtitle_id}"
tags: ["DAM: Files"]
---

# Updates a subtitle track of a DAM file

`PATCH /dam/files/{file_id}/subtitles/{subtitle_id}`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/files/{file_id}/subtitles/{subtitle_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/files/:file_id/subtitles/:subtitle_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates the attributes sent. Sending cues (JSON) or srt (SubRip text) replaces every cue of the track; send one of them, not both. See the two request examples. The response does not carry the cues; read them from the track's cue list.

## Path parameters

- `file_id` string, required
- `subtitle_id` string, required

## Request body

- FileSubtitleUpdateRequest
  - `data` object, required
    - `type` string, required
    - `attributes` object, required
      - `language` 'en' | 'da' | 'de' | 'sv' | 'no' | 'nn' | 'fi' | 'nl' | 'fr' | 'es' | 'it' | 'pt' | 'pl' | 'ru' | 'uk' | 'cs' | 'sk' | 'ro' | 'hu' | 'el' | 'tr' | 'bg' | 'hr' | 'sr' | 'sl' | 'et' | 'lv' | 'lt' | 'is' | 'ga' | 'ca' | 'id' | 'ms' | 'vi' | 'th' | 'ar' | 'he' | 'hi' | 'fa' | 'af' | 'zh' | 'ja' | 'ko': One of the languages subtitles can be generated and translated in.
      - `label` string, nullable
      - `is_default` boolean
      - `cues` FileSubtitleCue[]: Replaces every cue of the track. Send either cues or srt.
        - `start_ms` integer, required
        - `end_ms` integer, required
        - `text` string, required
      - `srt` string: Replaces every cue of the track with the content of a SubRip (.srt) file. Send either cues or srt.

## Response `200`

success

- FileSubtitleResponse
  - `data` FileSubtitle
    - `id` string
    - `type` string
    - `attributes` FileSubtitleAttributes
      - `language` string
      - `label` string, nullable
      - `source` 'manual' | 'import' | 'ai'
      - `is_default` boolean
      - `version` integer
      - `created_at` string
      - `updated_at` string
    - `relationships` object
      - `cues` object
        - `links` object
          - `related` string: URL of the paged cue list of the track
    - `links` object
      - `self` string

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: File or subtitle not found
- `422`: Invalid attributes, an unsupported language, malformed SRT or overlapping cues

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
