Update audio / subtitle track
This endpoint allows you to update an existing audio or subtitle track associated with a media file. When updating a track, you must provide the new languageName and languageCode, ensuring both parameters are included in the request. You can optionally provide a title for the track.
How it works
-
Send a PATCH request to this endpoint, replacing
{mediaId}with the media ID, and{trackId}with the ID of the track you want to update. -
Provide the necessary details in the request body.
-
Receive a response confirming the track update.
Webhook Events
After updating a track, your system must receive webhook notifications:
-
After successfully updating a track, your system must receive the webhook event video.media.track.updated.
-
Once the new track is processed and ready, you must receive the webhook event video.media.track.ready.
-
Once the media file is updated with the new track details, a video.media.updated event must be triggered.
Example
Suppose you previously added a French subtitle track to a video but now need to update it with a different file. By calling this API, you can replace the existing subtitle file (.vtt) with a new one while keeping the same track ID. This is useful when:
- The original track file has errors and needs correction.
- You want to improve subtitle translations or replace an audio track with a better-quality version.
Related guides: Add own subtitle tracks, Add own audio tracks
Authentication
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request.
- Username: Access Token ID
- Password: Secret Key
Activate your FastPix account to generate your API credentials. See the guide here
Path parameters
Request
The BCP 47 language code representing the track’s language.
The full name of the language corresponding to the languageCode.