YouTube API

Use the Crosspostify API to upload videos and YouTube Shorts to YouTube — with full title, description, privacy settings, category, and tag support.

Post Types
Video · Short
Privacy Options
Public · Unlisted · Private
Title
Required
Categories & Tags
Supported

YouTube is the world's largest video platform. The Crosspostify YouTube API integration lets you programmatically upload long-form videos and Shorts to one or more YouTube channels — with full control over title, description, privacy, category, and tags.

This page covers everything specific to YouTube when using the Crosspostify API. For general authentication, rate limits, and error handling, see the full API Reference.

YouTube-Specific Parameters

YouTube has the richest set of per-post parameters of any platform on Crosspostify. Unlike social platforms, YouTube treats every upload as a standalone piece of content with its own metadata.

accountId✓ AppliesRequired. Your YouTube channel ID from /social-accounts.
title✓ AppliesRequired for YouTube. The video title shown in search and on the watch page. Max 100 characters.
caption✓ AppliesUsed as the video description. Supports links, hashtags, and chapter timestamps.
privacy✓ AppliesYouTube exclusive. Controls visibility: "public", "unlisted", or "private". Defaults to "public".
categoryId✓ AppliesYouTube exclusive. Numeric string ID for the YouTube video category (e.g. "22" for People & Blogs).
tags✓ AppliesYouTube exclusive. Array of keyword tags to improve discoverability. Max 500 characters total.
is_aigc✗ IgnoredTikTok only — ignored for YouTube.
facebookFirstComment✗ IgnoredFacebook only — ignored for YouTube.
textFormatPresetId✗ IgnoredFacebook only — ignored for YouTube.
boardId✗ IgnoredPinterest only — ignored for YouTube.

Supported Endpoints

YouTube is video-only. Both regular videos and Shorts use the same /post/video endpoint — YouTube automatically classifies Shorts based on duration and aspect ratio.

Video only — no images or text posts

YouTube does not support image posts or text-only posts via the API. Only video uploads are supported. Community posts are not available through the Crosspostify API.

POST/post/videoLong-form Video

Upload a long-form video to a YouTube channel. Supports full metadata including title, description, privacy, category, and tags.

YouTube Video Notes

  • title is required for YouTube — unlike other platforms where it's optional or unused
  • caption maps to the YouTube video description field
  • Add chapter timestamps in the description (e.g. 00:00 Intro) for automatic chapter markers
  • Use privacy: "private" to upload without publishing, then manually review before going public
  • Upload your video first via POST /media and use the returned mediaId
  • All datetime values must be in UTC timezone (ISO 8601 format with Z suffix)

Request Body

mediaIdstringrequired

The ID of the uploaded video file. Obtain this from POST /media.

scheduledDatestringoptional

Schedule the video to go live at a future time (ISO 8601 with 'Z' suffix). Video will be set to 'private' until then.

postsarrayrequired

Array of post objects. Include one object per YouTube channel.

posts[].accountIdstringrequired

The YouTube channel ID. Retrieve from GET /social-accounts.

posts[].titlestringrequired

The video title. Shown in search results and on the watch page. Max 100 characters.

posts[].captionstringoptional

The video description. Supports plain text, links, hashtags, and chapter timestamps. Max 5,000 characters.

posts[].privacystringoptional

Visibility setting. One of: "public", "unlisted", or "private". Defaults to "public".

posts[].categoryIdstringoptional

YouTube category ID as a numeric string (e.g. "22" for People & Blogs). See the Categories section below.

posts[].tagsarrayoptional

Array of keyword strings to improve discoverability. Total length of all tags must not exceed 500 characters.

Response

{ "success": true, "data": { "postId": "post_yt_001", "status": "PROCESSING", "scheduledDate": "2025-06-01T14:00:00Z", "videoDuration": 482, "accounts": [ { "accountId": "acc_youtube_456", "platform": "youtube", "status": "PROCESSING" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/video" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaId": "vid_12345",
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_youtube_456",
        "title": "My Awesome Video Title",
        "caption": "Full video description here. Supports links, hashtags, and timestamps.\n\n00:00 Intro\n01:30 Main Content\n05:00 Outro",
        "privacy": "public",
        "categoryId": "22",
        "tags": ["tutorial", "howto", "youtube"]
      }
    ]
  }'
POST/post/videoYouTube Shorts

Upload a YouTube Short using the same /post/video endpoint. YouTube automatically classifies the video as a Short based on its duration and aspect ratio — no special flag needed.

YouTube Shorts Classification

  • YouTube auto-classifies as a Short if: duration is ≤ 60 seconds AND aspect ratio is 9:16 (vertical)
  • Adding #Shorts to the title or description helps YouTube classify it faster
  • Shorts appear in the dedicated Shorts feed and on the channel's Shorts tab
  • title is still required — keep it punchy and under 100 characters
  • Tags and category still apply and help with discoverability

Request Body

mediaIdstringrequired

The ID of the uploaded short video file (≤60s, 9:16 aspect ratio). Obtain from POST /media.

scheduledDatestringoptional

Schedule the Short to go live at a future time (ISO 8601 with 'Z' suffix).

postsarrayrequired

Array of post objects. Include one object per YouTube channel.

posts[].accountIdstringrequired

The YouTube channel ID. Retrieve from GET /social-accounts.

posts[].titlestringrequired

The Short title. Include "#Shorts" to help YouTube classify it. Max 100 characters.

posts[].captionstringoptional

The Short description. Include "#Shorts" here too for faster classification. Max 5,000 characters.

posts[].privacystringoptional

Visibility: "public", "unlisted", or "private". Defaults to "public".

posts[].categoryIdstringoptional

YouTube category ID as a numeric string.

posts[].tagsarrayoptional

Array of keyword tags. Max 500 characters total.

Response

{ "success": true, "data": { "postId": "post_yt_short_002", "status": "PROCESSING", "scheduledDate": "2025-06-01T14:00:00Z", "videoDuration": 45, "accounts": [ { "accountId": "acc_youtube_456", "platform": "youtube", "status": "PROCESSING" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/video" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaId": "vid_short_789",
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_youtube_456",
        "title": "Quick tip you need to know! #Shorts",
        "caption": "Drop a comment if this helped! 👇 #Shorts #Tutorial",
        "privacy": "public"
      }
    ]
  }'

Privacy Settings

YouTube is the only platform on Crosspostify with explicit privacy controls per upload. Use the privacy parameter to control who can see the video.

public
PublicVisible to everyone. Appears in search results, recommendations, and your channel page. Default if omitted.
unlisted
UnlistedOnly accessible via direct link. Does not appear in search or on your channel page. Useful for sharing with specific people.
private
PrivateOnly visible to you and people you explicitly share it with. Useful for uploading drafts before publishing.
Scheduled videos are set to private until publish time

When you use scheduledDate, YouTube sets the video to private internally until the scheduled time, then automatically switches it to public. You do not need to set privacy: "private" manually for scheduled posts.

Video Categories

Use the categoryId parameter to assign your video to a YouTube category. This helps YouTube's algorithm surface your content to the right audience.

1Film & Animation
2Autos & Vehicles
10Music
15Pets & Animals
17Sports
19Travel & Events
20Gaming
22People & Blogs
23Comedy
24Entertainment
25News & Politics
26Howto & Style
27Education
28Science & Technology
29Nonprofits & Activism

Content Guidelines

YouTube has strict technical requirements for uploads. Videos that don't meet these specs may be rejected or processed with degraded quality.

Long-form Video Requirements

  • Format: MP4 (H.264 + AAC recommended)
  • Max file size: 256GB (YouTube limit)
  • Max duration: 12 hours (verified accounts)
  • Recommended resolution: 1080p or 4K
  • Recommended ratio: 16:9 (landscape)
  • Frame rate: 24, 25, 30, 48, 50, or 60fps

YouTube Shorts Requirements

  • Max duration: 60 seconds
  • Aspect ratio: 9:16 (vertical) required
  • Min resolution: 1080×1920px recommended
  • Format: MP4 (H.264 + AAC recommended)
  • Add #Shorts to title or description
  • Frame rate: 30 or 60fps recommended

Title & Description Tips

  • Title: max 100 characters
  • Description: max 5,000 characters
  • Put keywords in the first 2-3 words of title
  • Add chapter timestamps (00:00 format) for chapters
  • First 150 chars of description shown in search
  • Tags: max 500 characters total across all tags

Scheduling

  • Minimum lead time: ~15 minutes ahead
  • All times must be UTC (ISO 8601 + Z)
  • Omit scheduledDate to publish immediately
  • Scheduled videos are private until publish time
  • No maximum scheduling window enforced