videos.update needs snippet.categoryId: retitle a Short safely

YouTube's videos.update requires snippet.categoryId whenever you send a snippet. How to retitle a Short from a batch without a failed call.

5 min readSume
All posts

When you call videos.update to change a Short's title or description, include snippet.categoryId in the same body. The Videos resource says so directly: of snippet.categoryId, "You must set a value for this property if you call the videos.update method." Leave it out and the update is not valid, however small the edit you wanted.

The line comes from the YouTube Data API Videos resource, read on 2026-10-03. That page does not say, in the part I read, what happens to the other snippet fields you omit, so the safe pattern is to read the video's current snippet first, change the one field you mean to change, and send the whole snippet back. Sume does not edit YouTube videos; its docs describe no YouTube endpoint, so this is a note for the code that sits next to your Sume jobs.

Why would I update a Short after upload?

Three common reasons in a batch workflow. A title was too long and you shortened it after the first check. A description needed a link or a chapter list once the video had a public address. Or a Sume job produced a better caption text and you want the description to match. In each case the edit is a metadata edit, and the category requirement applies to every one of them.

The title rules are unchanged on update: the Videos resource caps snippet.title at 100 characters, and snippet.description at 5000 bytes. The byte check for descriptions and the title check apply before an update just as they do before an insert.

What an update needs in the snippet (read 2026-10-03)
FieldRule from the Videos resource
snippet.categoryIdMust be set when you call videos.update
snippet.titleUp to 100 characters; no < or >
snippet.descriptionUp to 5000 bytes; no < or >
snippet.tags[]Up to 500 characters for the whole list

What does a safe update body look like?

The body below changes only the title, but carries the category that the page requires. Replace the id and the category with the values you read back from the video; the numbers here are placeholders, not recommendations. The script builds the body and refuses to send an update with no category.

import json

def update_body(video_id, current_snippet, new_title):
    if not current_snippet.get("categoryId"):
        raise ValueError("videos.update needs snippet.categoryId")
    if len(new_title) > 100:
        raise ValueError("title is over 100 characters")
    snippet = dict(current_snippet)
    snippet["title"] = new_title
    return {"id": video_id, "snippet": snippet}

current = {"title": "Ep 1", "description": "Part one.", "categoryId": "22"}
print(json.dumps(update_body("VIDEO_ID", current, "Episode 1: the cold open"), indent=2))

Where does Sume fit in this loop?

Sume makes the file and, if you ask, the text you derive the metadata from. Video inspect can return a transcript for one clip when you pass transcribe: true, at a public rate of $0.01 per audio minute, and the sentence segments are gapless. You can use that text to rewrite a description later and send it through the update above.

What Sume does not do is read your YouTube category or push the edit. Keep that logic in your own service, and keep the YouTube OAuth token separate from the Sume API key, which is a plain Bearer key sent to api.sume.com.

How do I avoid breaking a scheduled Short?

If a Short is scheduled, remember the status.publishAt rule: the Videos resource says it can be set only when the privacy status is private. An update body that touches status should keep that in mind; publishAt in the past publishes immediately covers the guard. A metadata-only update that sends just snippet leaves scheduling out of the request, which is the smaller blast radius.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume