Tutorials · 2 min read

big red button

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

Sometimes, it is necessary to say goodbye. In this post, we walk through the steps required to delete a video from your api.video account.

Doug Sillars

November 23, 2020

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.

Authentication

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.

Deleting

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.

Try out more than 80 features for free

Access all the features for as long as you need.
No commitment or credit card required

Video API, simplified

Fully customizable API to manage everything video. From encoding to delivery, in minutes.

Built for Speed

The fastest video encoding platform. Serve your users globally with 140+ points of presence. 

Let end-users upload videos

Finally, an API that allows your end-users to upload videos and start live streams in a few clicks.

Affordable

Volume discounts and usage-based pricing to ensure you don’t exceed your budget.