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 1. 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. 2. Provide the necessary details in the request body. 3. Receive a response confirming the track update. #### Webhook Events After updating a track, your system must receive webhook notifications: 1. After successfully updating a track, your system must receive the webhook event <a href="https://fastpix.com/docs/webhooks/transform-media-events#videomediatrackupdated">video.media.track.updated</a>. 2. Once the new track is processed and ready, you must receive the webhook event <a href="https://fastpix.com/docs/webhooks/transform-media-events#videomediatrackready">video.media.track.ready</a>. 3. Once the media file is updated with the new track details, a <a href="https://fastpix.com/docs/webhooks/media-events#videomediaupdated">video.media.updated</a> 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: <a href="https://fastpix.com/docs/video-on-demand/add-subtitles-to-a-video">Add own subtitle tracks</a>, <a href="https://fastpix.com/docs/video-on-demand/add-audio-to-a-video">Add own audio tracks</a>

Authentication

AuthorizationBasic
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. - <b>Username:</b> Access Token ID - <b>Password:</b> Secret Key Activate your FastPix account to generate your API credentials. <a href="https://fastpix.com/docs/getting-started/activate-your-account" target="_blank">See the guide here</a>

Path parameters

trackIdstringRequiredformat: "uuid"
The unique identifier assigned to the media when created. The value must be a valid UUID.
mediaIdstringRequiredformat: "uuid"
The unique identifier assigned to the media when created. The value must be a valid UUID.

Request

This endpoint expects an object.
languageCodestringRequiredDefaults to fr

The BCP 47 language code representing the track’s language.

languageNamestringRequiredDefaults to French

The full name of the language corresponding to the languageCode.

titlestringOptional<=255 characters
Title of the track.

Response

Media details updated successfully
successboolean
Demonstrates whether the request is successful or not.
dataobject
Contains details about the track that was added or updated.