Update Caption Track
youtube_update_captionUpdate YouTube caption track draft status or replace its content by providing caption ID and optionally a new file path.
Instructions
Update an existing caption track's draft status and/or replace its content.
When filePath is supplied the caption file is replaced by streaming the new
file from disk. When only isDraft is supplied only the metadata is updated
(no file replacement).
Args
captionId(string, required): The ID of the caption track to update.isDraft(boolean, optional): New draft state. Omit to leave unchanged.filePath(string, optional): Absolute local path to a replacement caption file. When provided, the track content is replaced.
Returns
{
"id": "string",
"language": "string",
"name": "string",
"trackKind": "string",
"isDraft": boolean
}Examples
Publish a draft track:
captionId="AYtvM...", isDraft=falseReplace content:
captionId="AYtvM...", filePath="/updated/en.vtt"Replace and publish:
captionId="AYtvM...", isDraft=false, filePath="/updated/en.vtt"
Errors
403: You can only update captions on your own channel. Check scopes (
youtube.force-ssl).404: Caption track not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| captionId | Yes | The ID of the caption track to update. | |
| isDraft | No | New draft state. Omit to leave the current value unchanged. | |
| filePath | No | Absolute local path to a replacement caption file. When provided, replaces the track's content. |