Platform Guide

YouTube

YouTube usually needs more metadata than short-form networks. UniPost exposes those controls in `platform_options.youtube` while keeping the publish flow consistent with the rest of the platform set.

Overview

YouTube is a single-video publish surface. Use it for long-form videos or Shorts. The most important platform-specific controls are privacy status, Shorts mode, category, and tags. For local video files, the most reliable UniPost workflow is to upload into the media library first and then publish with `media_ids`.

Supported capabilities

CapabilitySupportedNotes
Video postsExactly 1 video
ShortsUse `platform_options.youtube.shorts`
SchedulingUse `scheduled_at`
Text-only postsXVideo-first platform
Image postsXNot a native publish target
AnalyticsSupported

Requirements

FieldRequiredLimitsNotes
media_urls or media_idsRequiredExactly 1 videoPrefer `media_ids` when starting from a local file
captionOptional5,000 charsUsed as title/description body context
platform_options.youtube.privacy_statusOptionalprivate / public / unlistedDefault is often private
platform_options.youtube.shortsOptionalbooleanRoutes the upload toward Shorts behavior

Platform-specific options

OptionValuesNotes
platform_options.youtube.category_idstringYouTube category ID
platform_options.youtube.tagsstring[]Tag list for snippet metadata

Example requests

The examples below are intentionally small and copyable. They show the request body only, assuming a standard POST /v1/social-posts call with Bearer auth.

Long-form video from a hosted URL

json
{
  "caption": "Quarterly product update",
  "account_ids": ["sa_youtube_1"],
  "media_urls": ["https://cdn.example.com/update.mp4"],
  "platform_options": {
    "youtube": {
      "privacy_status": "public",
      "category_id": "22",
      "tags": ["product", "quarterly", "update"]
    }
        }
}

Long-form video from UniPost media library

json
{
  "caption": "Quarterly product update",
  "account_ids": ["sa_youtube_1"],
  "media_ids": ["med_uploaded_video_1"],
  "platform_options": {
    "youtube": {
      "privacy_status": "public",
      "category_id": "22",
      "tags": ["product", "quarterly", "update"]
    }
  }
}

Shorts

json
{
  "caption": "30s feature demo",
  "account_ids": ["sa_youtube_1"],
  "media_urls": ["https://cdn.example.com/demo-vertical.mp4"],
  "platform_options": {
    "youtube": {
      "privacy_status": "public",
      "shorts": true
    }
  }
}

Common validation errors

CodeWhat it means
media_requiredYouTube requires exactly one video
too_many_mediaMore than one media asset supplied
invalid_privacy_statusYouTube privacy value is not recognized

Once you know the correct request shape for this platform, move to the API reference for the full endpoint contract, response schema, and validation payload shape.