YouTube

Upload videos and Shorts to a YouTube channel via the Data API v3. The platform id is youtube. The main container’s content becomes the video description, and the title config field sets the title. PostFuze uploads in resumable chunks so large files survive serverless timeouts.

A video is required

Every YouTube post must carry exactly one video in the main container; a request without one fails the target before upload. YouTube has no reply/comment surface in scope, so first-comment and thread containers are ignored.

Supported content

  • Video — a standard upload; the description comes from the container content.
  • Short — set isShort to append #Shorts to the title and description.

Limits

PropertyValue
Title100 characters (truncated if longer)
Description5,000 characters (truncated if longer)
MediaOne video, MP4 recommended; ≤128GB / 12h; videos >15min require a verified channel
Upload256KB-aligned resumable chunks
First commentn/a
Token lifetimeAccess token ~1h (auto-refreshed)

Configuration fields

Set under config.youtube. For compatibility PostFuze also accepts the same fields nested under config.youtube.youtubeConfiguration.

FieldTypeDefaultNotes
titlestringcontainer contentVideo title, ≤100 characters. Falls back to the container content.
isShortbooleanfalsePublish as a YouTube Short (appends #Shorts).
categoryIdstring"22"YouTube category id (22 = People & Blogs).
privacyStatusstringpublicOne of public, private, unlisted.
madeForKidsbooleanfalseSelf-declared “made for kids” flag.
tagsstring[][]Video tags.
thumbnailUrlstringmedia thumbnailCustom thumbnail (public HTTPS URL) applied via thumbnails.set after upload. Requires a verified channel; ignored otherwise. Alias: thumbnail_url.

Required scopes

YouTube uses Google OAuth 2.0 (offline access). Configure scopes on the BYOK network record; PostFuze expects:

  • https://www.googleapis.com/auth/youtube.upload
  • https://www.googleapis.com/auth/youtube.readonly

Create a post

Upload a Short with a title, tags and an unlisted privacy status:

curl
curl https://api.postfuze.com/api/v1/posts \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": ["acct_yt_01"],
    "containers": [
      {
        "content": "A 30-second tour of the PostFuze playground. Full docs in the description!",
        "media": [{ "id": "media_short_mp4" }]
      }
    ],
    "config": {
      "youtube": {
        "title": "PostFuze Playground in 30s",
        "isShort": true,
        "privacyStatus": "unlisted",
        "categoryId": "28",
        "tags": ["devtools", "api", "PostFuze"]
      }
    }
  }'
201 Created
{
	"id": "post_e018",
	"status": "queued",
	"default_config": {
		"youtube": { "title": "PostFuze Playground in 30s", "isShort": true, "privacyStatus": "unlisted", "categoryId": "28", "tags": ["devtools", "api", "PostFuze"] }
	},
	"containers": [
		{ "id": "ctr_y1", "position": 0, "role": "main", "content": "A 30-second tour of the PostFuze playground. Full docs in the description!" }
	],
	"targets": [
		{ "id": "tgt_yt1", "social_account_id": "acct_yt_01", "platform": "youtube", "status": "queued", "platform_post_id": null }
	]
}

While the chunked upload runs the target reports uploading; once YouTube finishes processing it flips to published with the video id in platform_post_id.