/v1/assets/{id}/tracks (POST)
POST
/v1/assets/{id}/tracks
const url = 'https://example.com/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tracks';const options = { method: 'POST', headers: { 'idempotency-key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"language_code":"example","name":"example","closed_captions":true,"passthrough":"example","url":"example","type":"text","text_type":"subtitles"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tracks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "language_code": "example", "name": "example", "closed_captions": true, "passthrough": "example", "url": "example", "type": "text", "text_type": "subtitles" }'Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»id
required
string format: uuid
Header Parameters
Sección titulada «Header Parameters»idempotency-key
required
string format: uuid
Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
language_code
required
string
name
string
closed_captions
boolean
passthrough
string
url
required
string
type
required
string
text_type
required
string
Responses
Sección titulada «Responses»Default Response