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
| Capability | Supported | Notes |
|---|---|---|
| Video posts | ✓ | Exactly 1 video |
| Shorts | ✓ | Use `platform_options.youtube.shorts` |
| Scheduling | ✓ | Use `scheduled_at` |
| Text-only posts | X | Video-first platform |
| Image posts | X | Not a native publish target |
| Analytics | ✓ | Supported |
Requirements
| Field | Required | Limits | Notes |
|---|---|---|---|
| media_urls or media_ids | Required | Exactly 1 video | Prefer `media_ids` when starting from a local file |
| caption | Optional | 5,000 chars | Used as title/description body context |
| platform_options.youtube.privacy_status | Optional | private / public / unlisted | Default is often private |
| platform_options.youtube.shorts | Optional | boolean | Routes the upload toward Shorts behavior |
Platform-specific options
| Option | Values | Notes |
|---|---|---|
| platform_options.youtube.category_id | string | YouTube category ID |
| platform_options.youtube.tags | string[] | 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
{
"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
{
"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
{
"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
| Code | What it means |
|---|---|
| media_required | YouTube requires exactly one video |
| too_many_media | More than one media asset supplied |
| invalid_privacy_status | YouTube privacy value is not recognized |
Related reference
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.