Delete A Video
This guide walks you through the different ways of manually and programmatically removing videos and introduces the Video Restore feature.
API documentation
Delete a video via API
Retrieve the video ID for the video you want to delete. You can do this by listing your videos, or you can look in your dashboard to find the ID of the video you want to delete.
Send a delete request to api.video containing the ID for the video you want to delete.
curl --request DELETE \
--url https://ws.api.video/videos/viZxSTFgXZVjFnFCUo363Ie \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NDI1NDk1NjAuMDE5ODA0LCJuYmYiOjE2NDI1NDk1NjAuMDE5ODA0LCJleHAiOjE2NDI1NTMxNjAuMDE5ODA0LCJwcm9qZWN0SWQiOiJwclJ6SUpKQTdCTHNxSGpTNDVLVnBCMSJ9.jjr4YADGbe62RmBBxJXLy1D61Mtfry_dq9nbriBXgkPrdlBJ8ZRP50CyW3AsGD7wSuKp2mXxEYSzj64zelT1IGOwg6KG4Gz9BZ9YWs0GAHKUIdgqn1gzITX5aQljIXx1fquXbawd-axBTi4icmaUjgXjfnyIcWOgHd2D8A3kpKiqiMmluh58JdnwPnH0OyVk0Rk824P0PI6SxfiTHfkCglPL6ixf9OgokMLPoVrsxH5C0xt3Z7lf5TJ0F78-JY-yTKvyaTTIfI6CFOMNaZUlMtgQwq8X93_2FA65Ntw3hdDML8gFKkLUxnBAtZMo9WAjUd30G4OcYasmlkc4Q_JSNw'
Delete a video in the dashboard
You can delete a video using your dashboard by doing the following:
Open your dashboard.
From the menu on the left, choose Videos.
On the Video screen, use the filtering and scrolling features to locate the video you want to delete. Place a checkmark next to one or more videos you want to delete, and push Delete.
Keep in mind that deleted videos can only be restored when you have the Video Restore feature enabled. Otherwise videos are deleted permanently.
You can also select the breadcrumbs icon next to each video to open an actions panel where you can select Delete.
Restoring deleted videos
By default, deleting a video is a permanent action. To avoid accidents and enable you to restore deleted videos, api.video offers the Video Restore feature.
If you have the Video Restore feature enabled, the DELETE
operation will temporarily discard the video instead of permanently deleting it.
You can restore discarded videos both via the API and the dashboard.
Listing discarded videos
You can list discarded videos via the API using the GET /discarded/videos
endpoint for all videos, and the GET /discarded/videos/{videoId}
for a specific video. Visit the API reference for more details.
You can also see all your discarded videos on the Archived Videos tab in the dashboard.
Restoring video via API
You can use the PATCH /discarded/videos/{videoId}
operation to restore a video, with the discarded
body parameter set to false
:
curl --request PATCH \
--url https://ws.api.video/discarded/videos/viZxSTFgXZVjFnFCU \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NDI1NDk1NjAuMDE5ODA0LCJuYmYiOjE2NDI1NDk1NjAuMDE5ODA0LCJleHAiOjE2NDI1NTMxNjAuMDE5ODA0LCJwcm9qZWN0SWQiOiJwclJ6SUpKQTdCTHNxSGpTNDVLVnBCMSJ9.jjr4YADGbe62RmBBxJXLy1D61Mtfry_dq9nbriBXgkPrdlBJ8ZRP50CyW3AsGD7wSuKp2mXxEYSzj64zelT1IGOwg6KG4Gz9BZ9YWs0GAHKUIdgqn1gzITX5aQljIXx1fquXbawd-axBTi4icmaUjgXjfnyIcWOgHd2D8A3kpKiqiMmluh58JdnwPnH0OyVk0Rk824P0PI6SxfiTHfkCglPL6ixf9OgokMLPoVrsxH5C0xt3Z7lf5TJ0F78-JY-yTKvyaTTIfI6CFOMNaZUlMtgQwq8X93_2FA65Ntw3hdDML8gFKkLUxnBAtZMo9WAjUd30G4OcYasmlkc4Q_JSNw'
-d '{
"discarded": false
}'
Restoring video in the dashboard
Visit the Archived Videos tab in the dashboard to restore videos one by one or in bulk. Simply select the videos you want to restore and then choose Restore.
Retention period for Video Restore
The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted. This period gives you time to restore accidentally discarded videos.
Visit the dashboard to enable this feature!
Limitations
Videos that are discarded are not listed by the GET /videos
or GET /videos/{videoId}
operations.
Discarded videos cannot be played. Restore the video first if you want to play it again.