---
title: "Upload a caption file"
method: POST
path: "/v1/media/{id}/captions/upload"
tags: ["media"]
---

# Upload a caption file

`POST /v1/media/{id}/captions/upload`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/media/{id}/captions/upload`
- Auth: HTTP bearer

Attach a caption file to a video. SRT files are converted to WebVTT; WebVTT files are stored as-is. This is the alternative to automatic caption generation.

## Path parameters

- `id` string, required

## Response `200`

Success.

- object
  - `data` object, required
    - `ok` true, required
    - `key` string, required: Storage path of the caption track.
    - `state` 'ready', required

## Other responses

- `400`: `wrong_kind`: not a video.
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `404`: No media with this id.
- `413`: Over 5 MB.
- `415`: Not a .vtt or .srt track.
- `422`: Empty body.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
