Replace Video
Replace an existing video asset without changing its playback URL
Use this flow when you need to upload a new source file for an existing video asset while keeping the same asset ID and playback URL.
Using REST API (Replace Video)
1. Create a replace request
Start the replacement by calling the Update Asset API with the existing asset_id and the input path in this format:
{workspace_id}/{asset_id}/origin-{asset_id}curl --request POST \
--url https://api.gumlet.com/v1/video/assets/update \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"asset_id": "<ASSET_ID>",
"input": "<WORKSPACE_ID>/<ASSET_ID>/origin-<ASSET_ID>"
}'Replace <WORKSPACE_ID> with the workspace that owns the asset and <ASSET_ID> with the video you want to replace.
2. Split the new video into parts
Split the new source video into parts before uploading it. Keep each part at least 5 MB, except the final part.
3. Sign and upload each part
For every part, call the Single Part API using the same asset_id and a sequential part_number starting from 1.
curl --request GET \
--url https://api.gumlet.com/v1/video/assets/<ASSET_ID>/multipartupload/<PART_NUMBER>/sign \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json'Upload the part binary to the returned part_upload_url with a PUT request, then store the ETag response header for that part.
curl -v -X PUT -T <PART_FILE> '<PART_UPLOAD_URL>'Repeat this step for every part of the replacement video.
4. Complete the multipart upload
After all parts are uploaded, call Complete Multipart Upload with the PartNumber and ETag collected for each part.
curl --request POST \
--url https://api.gumlet.com/v1/video/assets/<ASSET_ID>/multipartupload/complete \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"parts": [
{ "PartNumber": 1, "ETag": "\"<ETAG_PART_1>\"" },
{ "PartNumber": 2, "ETag": "\"<ETAG_PART_2>\"" }
]
}'5. Track processing
Use the Get Asset Status API to monitor the asset until processing completes.
The replacement keeps the existing asset ID and playback URL. If your previous thumbnail or generated subtitles no longer match the new video, update them after the replacement finishes.
Updated about 2 hours ago
