# YouTube API: Posting Reference

YouTube support is limited to YouTube Shorts. OmniSocials does not publish regular long-form videos through the API. The YouTube channel must be monetization-eligible to publish via the YouTube Data API.

**Channel ID:** `youtube`

## Supported content types

| Type | Supported | Notes |
|------|-----------|-------|
| Feed post | - | Not supported |
| Story | - | Not supported |
| Reel (Short) | ✅ | Vertical video, up to 3 minutes |

## Minimal example

YouTube posts must be `type: "reel"` and must include a single vertical video.

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "reel",
    "content": { "default": "Behind the scenes #shorts" },
    "accounts": ["your-youtube-account-id"],
    "media_urls": ["https://example.com/short.mp4"],
    "youtube": {
      "title": "Behind the scenes",
      "privacy_status": "public"
    }
  }'
```

## Platform-specific options

| Field | Type | Description |
|-------|------|-------------|
| `youtube.title` | string | Video title. Defaults to `"YouTube Short"` if omitted. Max 100 characters. |
| `youtube.tags` | array of strings | Tags for discovery. Max 500 characters total across all tags. |
| `youtube.privacy_status` | string | `public`, `private`, or `unlisted`. Defaults to `public`. |
| `youtube.category_id` | string | YouTube category ID. Defaults to `"22"` (People & Blogs). |
| `youtube.made_for_kids` | boolean | Mark as made-for-kids content under COPPA. Defaults to `false`. |
| `youtube.notify_subscribers` | boolean | Send subscription notification when published. Defaults to `false`. |
| `youtube.contains_synthetic_media` | boolean | Disclose that the video contains AI-generated content. Defaults to `false`. |
| `youtube.first_comment` | string | Text auto-posted as the first comment on the video right after it publishes (max 10000 characters). The video must have comments enabled. |

## Media requirements

| Requirement | Value |
|-------------|-------|
| Format | MP4 |
| Aspect ratio | 9:16 (vertical) |
| Duration | Up to 3 minutes |
| File size | Up to 1 GB (OmniSocials upload ceiling; YouTube itself allows far larger) |
| Resolution | 1080 × 1920 recommended |

Videos outside these constraints are rejected. There is no conversion or trimming step.

## Limitations

- Only Shorts are supported. Regular long-form uploads require the YouTube Upload API and OAuth scopes that OmniSocials does not request.
- YouTube's API enforces a daily quota. Heavy publishing workloads may exceed quota during traffic spikes and return `429` with a `quotaExceeded` code.
- `made_for_kids: true` disables most interaction features (comments, community tab, end screens) on the resulting Short.
