Add subtitles to a VOD

Request a signed upload for a .srt or .vtt subtitle file. Use ajax for a browser form POST or curl for a signed PUT. Then upload the file to the returned bucket.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request a signed upload for a subtitle file (.srt or .vtt) on an existing VOD. This endpoint does not accept the file bytes. Init returns storage credentials; you then upload the file to the bucket.

Authenticate with X-Api-Key and send X-Format: default. JSON bodies need Content-Type: application/json. Init returns 200. The storage POST typically returns 201; a signed PUT typically returns 200.

POST /v2/vod/{id}/subtitles

FieldRequiredNotes
language_short_nameyesTwo-letter ISO 639-1 language code (for example en, fr).
file_nameyesSubtitle filename. Extension is used in the storage key (.srt / .vtt).
upload_typeyesajax (browser form POST) or curl (signed PUT).

After a successful storage upload, confirm with List subtitles. Each track includes subtitle-id, subtitle-filename, language names, subtitle-url (CDN), and target-id.

Ajax

Init returns form fields. POST them to https://{bucket} (do not send bucket as a form field). Append file last. Include x-amz-algorithm.

curl -X POST "https://developer.dacast.com/v2/vod/{id}/subtitles" \
  -H "X-Api-Key: insertYourApiKeyHere" \
  -H "X-Format: default" \
  -H "Content-Type: application/json" \
  -d "{\"language_short_name\":\"en\",\"file_name\":\"en.srt\",\"upload_type\":\"ajax\"}"
{
  "acl": "private",
  "bucket": "upload.dacast.com",
  "key": "subtitle/{subtitle-id}/true/.srt",
  "policy": "…",
  "success_action_status": "201",
  "x-amz-algorithm": "AWS4-HMAC-SHA256",
  "x-amz-credential": "AKIA…/20260826/us-east-1/s3/aws4_request",
  "x-amz-date": "20260826T163132Z",
  "x-amz-signature": "…"
}

The UUID in key is the track’s subtitle-id once the upload is processed.

curl -X POST "https://upload.dacast.com" \
  --form "key=subtitle/{subtitle-id}/true/.srt" \
  --form "acl=private" \
  --form "success_action_status=201" \
  --form "policy=…" \
  --form "x-amz-algorithm=AWS4-HMAC-SHA256" \
  --form "x-amz-credential=AKIA…/20260826/us-east-1/s3/aws4_request" \
  --form "x-amz-date=20260826T163132Z" \
  --form "x-amz-signature=…" \
  --form "[email protected];type=application/x-subrip"

A successful storage POST returns 201 with an XML PostResponse (Location, Bucket, Key, ETag).

cURL

Init with "upload_type": "curl". file_name is used in the generated curl-command (-T en.srt). PUT the file to url (or run curl-command).

curl -X POST "https://developer.dacast.com/v2/vod/{id}/subtitles" \
  -H "X-Api-Key: insertYourApiKeyHere" \
  -H "X-Format: default" \
  -H "Content-Type: application/json" \
  -d "{\"language_short_name\":\"fr\",\"file_name\":\"fr.srt\",\"upload_type\":\"curl\"}"
{
  "curl-command": "curl -T fr.srt 'https://s3.amazonaws.com/upload.dacast.com/subtitle/{subtitle-id}/true/.srt?…'",
  "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "url": "https://s3.amazonaws.com/upload.dacast.com/subtitle/{subtitle-id}/true/.srt?…"
}

id matches target-id on the list response. The UUID in the storage path is subtitle-id.

Path Params
string
required

UUID of the VOD.

Body Params
string
required

Two-letter ISO 639-1 language code (for example en, fr).

string
required

Subtitle filename. Use a .srt or .vtt extension; it is reflected in the storage key.

string
enum
required

How you will upload the file: ajax (form POST) or curl (signed PUT).

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json