> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Post to YouTube

> What a YouTube channel takes through the API: one video with a title, description, privacy, tags, playlist, language and disclosures, media limits, first comments, deletes, comments and analytics.

A YouTube account is a channel, with `platform` `youtube`. Each post uploads one video. A YouTube post needs a video: photos aren't taken.

## What you can post

* One video, with a title and a description.
* The video goes out `public`, `unlisted` or `private`.
* Shorts: YouTube makes every square or vertical video up to 3 minutes a Short, and no setting changes that. `video_type` `short` only changes the title: with no `title`, the title is the start of the description or post text with `#Shorts` at the end. A `title` that is only `#Shorts` does the same on any video, a `short` or not.
* The video can go into one of the channel's playlists once it is up.

## Settings

Every key is optional. [Create a post](/docs/api-reference/posts/create.md#platform-specific-settings) has the full list.

| Key | What it does |
| - | - |
| `title` | The video's title, up to 100 characters. Without it, the title is the start of the `description` setting when it's set, otherwise of the post's text, cut to fit; on a `short`, with `#Shorts` at the end. A title of only `#Shorts` gets the same text, with `#Shorts` at the end on any video. |
| `description` | YouTube's own description, instead of the post's text. |
| `privacyStatus` | `public` (the default), `unlisted` or `private`. |
| `tags` | A list of tags, or one text with commas between them. 500 characters in all, as YouTube counts them: a comma between two tags counts, and a tag with a space counts 2 more (`"road trip"` is 11). More answers `422`. |
| `playlist_id` | A playlist of the channel, from [Get an account](/docs/api-reference/accounts/get.md)'s `playlists`. The video is added once it is up. |
| `language` | The language of the title and description, as one of YouTube's language codes, such as `en`, `pt-PT` or `zh-TW`. Hebrew is `iw` on YouTube (`he` is taken too). A code YouTube doesn't offer answers `422` with the list. |
| `category_id` | A YouTube category id. |
| `containsSyntheticMedia` | The video shows realistic people, places or events that were made or changed with AI (default `false`). YouTube labels it. |
| `hasPaidProductPlacement` | The video has product placement, a sponsorship or an endorsement. Left out, PostSyncer doesn't send it: since November 2026 YouTube no longer takes a missing value as "no". |
| `license` | `youtube` (the default) or `creativeCommon` (Creative Commons Attribution). Another value answers `422`. |
| `embeddable` | Allow embedding on other sites (default `true`). |
| `selfDeclaredMadeForKids` | Mark the video as made for kids (default `false`). |
| `notifySubscribers` | Tell subscribers about the upload (default `true`). With `false`, YouTube sends subscribers no notification about it. |
| `video_type` | `video` (the default) or `short`, as above. |
| `media` | This account's own media library ids, instead of the post's media. |

## Text

* The title takes 100 characters. The description takes 5,000 bytes: YouTube counts bytes, so a letter outside English can take 2 to 4. PostSyncer cuts longer text to those limits when it's sent, never inside a letter. A cut description gives the post's row a `text_shortened` note. See [the post object](/docs/api-reference/posts/object.md).
* YouTube refuses `<` and `>` in a title or description, so PostSyncer takes them out.

## Media

| | Limit |
| - | - |
| Video | 1, up to 500 MB (YouTube allows bigger files; 500 MB is the most PostSyncer takes for one file) |
| Photos | None |
| Video types | MP4, MOV, WebM |

* YouTube itself also takes AVI, WMV and FLV, but the API doesn't take those files: convert them to MP4 first.
* PostSyncer doesn't check a video's length for YouTube. YouTube's own limits apply to the channel.
* Set the video's thumbnail with `cover_image.thumbnail` on the first item: a picture, as a library id or a link. YouTube takes a picture, never a frame. See [Video covers](/docs/guides/media.md#video-covers).

## Playlists

* [Get an account](/docs/api-reference/accounts/get.md) lists a channel's `playlists`, each with its `id`, `title`, `privacy_status` and `video_count`. [List accounts](/docs/api-reference/accounts/list.md) doesn't, to keep it fast. MCP: `get-account`.
* A channel connected before PostSyncer asked YouTube for playlist access has `playlists_reconnect: true` and `playlists: []`. Reconnect it to list its playlists and add videos to them.
* When YouTube doesn't answer, `playlists` is `null`, not `[]`: try again later. Up to 500 playlists are listed.
* When YouTube doesn't add the video to the playlist (the playlist was deleted, or the channel lost access), the video still goes out, and the post's row gets a `setting_not_applied` note with `setting: "playlist_id"` and YouTube's reason. When YouTube never answers and PostSyncer can't check the playlist either, the note says the video may not have been added: check the playlist on YouTube. See [the post object](/docs/api-reference/posts/object.md).

## What PostSyncer doesn't set

* Whether view counts and ratings are public: YouTube shows them either way.
* The audio's language: PostSyncer doesn't set it. Set it in YouTube Studio if you need it.
* A time to publish on YouTube's side: PostSyncer uploads the video at the post's time.

## More than one item and first comments

* YouTube has no threads. The items are joined into one description, with blank lines between them.
* A first comment (`is_first_comment: true`) is a comment under the video, `first_comment_delay` minutes after it goes out (1 when you leave it out). It's text only: a first comment with media answers `422`.

## Delete a post

Deleting the post in PostSyncer asks YouTube to delete the video. [Test safely](/docs/test-safely.md#what-cant-be-undone) says what happens when YouTube refuses.

## Comments

* PostSyncer reads comments an hour after the video goes out, every 6 hours for its first day, then once a day until it's 7 days old, and whenever you ask with [Sync comments](/docs/api-reference/comments/sync.md).
* A channel needs comment access, which it grants when it connects. A channel connected without it isn't read on the schedule, and hiding a comment answers `422` with `YouTube did not hide the comment. Reconnect YouTube and allow comment access.` Reconnect the channel to fix it.
* Replies go out from the channel, as text. Media on a reply isn't sent to YouTube.
* Hide holds the comment for review on YouTube, and `"hidden": false` publishes it again.
* Delete removes the channel's own comment, a reply sent from PostSyncer included. Someone else's comment is rejected instead, which takes it off YouTube for good. Either way it's `is_deleted_on_platform: true` and can't be shown again.
* A delete answers `200`, also when YouTube refuses or the channel needs reconnecting. [Get comment](/docs/api-reference/comments/get.md) shows whether it was removed.

## Analytics

YouTube gives `impressions`, `likes`, `comments` and `shares`. See [Read analytics](/docs/guides/analytics.md).

## Example

A draft video, unlisted, with a title, tags and a playlist:

```json theme={null}
{
  "workspace_id": 4815,
  "schedule_type": "draft",
  "content": [
    {
      "text": "Two minutes of pouring latte art at Halden Coffee.",
      "media": ["https://cdn.postsyncer.com/examples/rosetta-pour.mp4"],
      "cover_image": { "thumbnail": "https://cdn.postsyncer.com/examples/rosetta-cover.jpg" }
    }
  ],
  "accounts": [
    {
      "id": 16241,
      "settings": {
        "title": "How we pour a rosetta",
        "privacyStatus": "unlisted",
        "tags": ["latte art", "coffee"],
        "playlist_id": "PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf",
        "language": "en"
      }
    }
  ]
}
```

## Related

> [card] [Answer comments](/docs/guides/comments.md)
>
> Read, reply, hide and delete.

> [card] [Compare the 12 networks](/docs/platforms/overview.md)
>
> How YouTube differs from the other networks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.