Skip to main content

Delete added captions

caution

This is a potentially destructive API. Files deleted using this API are removed almost-immediately from our servers. When implementing this API, it is recommended to test with a new trial account and verify that there is no incorrect code and only the desired files are getting deleted.

Use this API to delete captions from videos when over-writing or adding new captions.

Request#

  • Method: DELETE
  • URL: https://dev.vdocipher.com/api/videos/{videoId}/files/{id}
const fs = require('fs');const rp = require('request-promise-native');
const authHeader = {  authorization: `Apisecret ${process.env.apisecret}`}
const deleteFile = async (videoId, fileId) => {  const result = await rp({    url:  `https://dev.vdocipher.com/api/videos/${videoId}/files/${fileId}`,    method: 'DELETE',    headers: authHeader,    json: true,  });  console.log(result);}
// replace with real valuesconst videoId = '_____';const fileToDelete = 1000;deleteFile(videoId, fileToDelete)  .then(console.log)  .catch((e) => {    if (!e.statusCode) {      throw e;    }    console.error(e.message)  });

Response#

Success#

  • Content-type: application/json
{  "message": "Deleted"}