logo api.video

Video deletion: Learn how to delete a video from your account

November 23, 2020 - Doug Sillars in Video deleteAuthenticate

We hate to see it happen, but sometimes a video becomes out of date - the information is no longer correct. Even though you can remove the link, sometimes it is just better to pull it off the web entirely. In this tutorial, we'll walk through the steps to delete a video from your api.video account.


To delete a video from your api.video account, you'll need to authenticate a session with your apiKey.

curl -X POST \
https://ws.api.video/auth/api-key \
-H 'Content-Type: application/json' \
-d '{"apiKey": "your_api_key"}'

This will return your authorization token for future API requests.


All api.video videos are identified by a videoId. If you know the videoId of the video you are deleting, you can now begin the deletion process.

Hint: The videoId is the random string at the end of the link you use for the video on the web.

Now we simply call the delete video endpoint with the videoId in the URL, and the authorization token as a header.

curl --request DELETE --url https://ws.api.video/videos/vi3bO7H9UAzibjwF5QxwJcw5  --header 'accept: application/vnd.api.video+json'  --header 'authorization: Bearer {api_token}'

This request will delete the video vi3bO7H9UAzibjwF5QxwJcw5. The api will simply return a 204 response on successful deletion.

Try it out!

We've built a sample Node application at delete.a.video. This API selects 3 videos from an api.video account. This is done with the search video attribute, and will returm the 3 oldest videos called "Live Stream". These three videos are displayed on the page, and by clicking the delete button - you can remove them permanently from the account!

The sample code for the app is on Github if you'd like to use the NodeJS SDK to delete videos.

Questions of comments? Leave a post on the community forum.


Doug Sillars

Head of Developer Relations

Doug Twitter