DAM: Files

Adds a subtitle track to a DAM file

Adds a subtitle track to the current version of a video or audio file. Send the cues either as JSON in cues or as the text of a SubRip (.srt) file in srt, not both; see the two request examples. Cues may not overlap. language must be one of the languages subtitles can be generated and translated in. Setting is_default makes this the file's only default track. The response does not carry the cues; read them from the track's cue list.

post/dam/files/{file_id}/subtitles

Request

Path parameters

file_idstring required

ID of File

Request body

Example request

{
  "data": {
    "type": "file_subtitle",
    "attributes": {
      "language": "da",
      "label": "Dansk",
      "is_default": true,
      "cues": [
        {
          "start_ms": 1000,
          "end_ms": 3500,
          "text": "Welcome to Kontainer."
        }
      ],
      "srt": "1\n00:00:01,000 --> 00:00:03,500\nWelcome to Kontainer.\n"
    }
  }
}

Response

created

Example response

{
  "data": {
    "id": "42",
    "type": "file_subtitle",
    "attributes": {
      "language": "da",
      "label": "Dansk",
      "source": "import",
      "is_default": true,
      "version": 1,
      "created_at": "2026-10-14T10:00:00.000000Z",
      "updated_at": "2026-10-14T10:00:00.000000Z"
    },
    "relationships": {
      "cues": {
        "links": {
          "related": "https://example.kontainer.com/jsonapi/v1/dam/files/12/subtitles/42/cues"
        }
      }
    },
    "links": {
      "self": "https://example.kontainer.com/jsonapi/v1/dam/files/12/subtitles/42"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.