All captions must belong to a subtitle. In order to create captions, you must first create a subtitle.
Reference
Find captions
Returns all captions for a given mediacontainer id. This array can have multiple subtitle ids – use filter on the client to disinguish between them! If none found, returns an empty array.
GET/v5/caption/:mediaContainerId
Returns all captions for a given mediacontainer id. This array can have multiple subtitle ids – use filter on the client to disinguish between them!
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| mediaContainerId | integer | ✓ | Return captions for the given mediaContainerId |
| settings | object | ✗ | Settings for this caption |
| └ style | string | ✗ | Style from subtitle settings |
| subtitleId | integer | ✗ | Return captions for the given subtitleId |
Response
| Field | Type | Description |
|---|---|---|
| content | string | Content of this caption |
| creatorId | integer | User id of the creator if this caption |
| customerId | integer | CustomerId this caption belongs to |
| endTime | float | endTime of this caption |
| id | integer | Id of the caption |
| mediaContainerId | integer | mediaContainerId this subtitle/caption is related to. |
| settings | object | Settings for this caption |
| └ style | string | Style from subtitle settings |
| startTime | float | startTime of this caption |
| subtitleId | integer | subtitleId of the caption |
Examples
Caption list (standard)
Request
/v5/caption
Response
{
"body": [
{
"id": 123,
"mediaContainerId": 456,
"subtitleId": 789,
"startTime": 0,
"endTime": 4,
"content": "This is my caption",
"creatorId": 321,
"customerId": 147
}
]
}Create Captions
Creates a new caption for a given subtitle. Checks the start and endTime against the original media duration.
POST/v5/caption
Creates a new caption for a given subtitle. Checks the start and endTime against the original media duration.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | ✓ | Content of this caption |
| endTime | float | ✓ | endTime of this caption |
| mediaContainerId | integer | ✓ | mediaContainerId this subtitle/caption is related to. |
| settings | object | ✗ | Settings for this caption |
| └ style | string | ✗ | Style from subtitle settings |
| startTime | float | ✓ | startTime of this caption |
| subtitleId | integer | ✓ | Create a caption for this subtitleId |
Response
| Field | Type | Description |
|---|---|---|
| content | string | Content of this caption |
| creatorId | integer | User id of the creator if this caption |
| customerId | integer | CustomerId this caption belongs to |
| endTime | float | endTime of this caption |
| id | integer | Id of the caption |
| mediaContainerId | integer | mediaContainerId this subtitle/caption is related to. |
| settings | object | Settings for this caption |
| └ style | string | Style from subtitle settings |
| startTime | float | startTime of this caption |
| subtitleId | integer | subtitleId of the caption |
Update Captions
Updates a caption
PUT/v5/caption/:mediaContainerId/:subtitleId/:id
Updates an existing caption.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | ✓ | Content of this caption |
| endTime | float | ✓ | endTime of this caption |
| id | integer | ✓ | Id of the caption you want to update |
| mediaContainerId | integer | ✓ | mediaContainerId this subtitle/caption is related to. |
| settings | object | ✗ | Settings for this caption |
| └ style | string | ✗ | Style from subtitle settings |
| startTime | float | ✓ | startTime of this caption you want to update |
| subtitleId | integer | ✓ | subtitleId of the caption you want to update |
Response
| Field | Type | Description |
|---|---|---|
| content | string | Content of this caption |
| creatorId | integer | User id of the creator if this caption |
| customerId | integer | CustomerId this caption belongs to |
| endTime | float | endTime of this caption |
| id | integer | Id of the caption |
| mediaContainerId | integer | mediaContainerId this subtitle/caption is related to. |
| settings | object | Settings for this caption |
| └ style | string | Style from subtitle settings |
| startTime | float | startTime of this caption |
| subtitleId | integer | subtitleId of the caption |
Destroy Captions
Deletes a caption and returns a status 204.
DELETE/v5/caption/:mediaContainerId/:subtitleId/:id
Delete a caption.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | integer | ✓ | Id of the caption you want to delete |
| mediaContainerId | integer | ✓ | mediaContainerId this subtitle/caption is related to. |
| subtitleId | integer | ✓ | subtitleId of the caption you want to delete |
Response
| Field | Type | Description |
|---|---|---|
| id | integer | Id of the caption |