Captions API

PUT - /api/v1/captions/:id - Updating

PUT /api/v1/captions/:id

Parameters

Name Description
caption_text text of the SRT file
language the ISO-639-2 language code of the file
attachment_id Id of the Video these captions are for
options options for wistia player
id ID of the caption

Request

Headers

Accept: application/json
X-Api-Token: 39ghz9yisemz6LFcpuAsgJXYEaqMFKh1DA
X-Api-Email: user-634@example.com

Route

PUT /api/v1/captions/3

Body

{"caption_text":"1\n00:00:01,478 --\u003e 00:00:04,020\nVimeoSrtPlayer\n\n2\n00:00:05,045 --\u003e 00:00:09,545\nSupport font","language":"fre","attachment_id":66}

cURL

curl "http://localhost:3000/api/v1/captions/3" -d '{"caption_text":"1\n00:00:01,478 --\u003e 00:00:04,020\nVimeoSrtPlayer\n\n2\n00:00:05,045 --\u003e 00:00:09,545\nSupport font","language":"fre","attachment_id":66}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: 39ghz9yisemz6LFcpuAsgJXYEaqMFKh1DA" \
	-H "X-Api-Email: user-634@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 271

Status

202 Accepted

Body

{
  "id": 3,
  "caption_text": "1\n00:00:01,478 --> 00:00:04,020\nVimeoSrtPlayer\n\n2\n00:00:05,045 --> 00:00:09,545\nSupport font",
  "language": "fre",
  "attachment_id": 66,
  "created_at": "2019-10-31T22:06:18Z",
  "updated_at": "2019-10-31T22:06:18Z",
  "school_id": 478,
  "options": {
  }
}