YouTube API
Use the Crosspostify API to upload videos and YouTube Shorts to YouTube — with title, description and privacy setting.
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 control over title, description and privacy (public, unlisted or private).
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 uses two text fields: title (the video title) and caption (the video description). The only YouTube-specific option is youtube.privacyStatus. Category, tags and the "made for kids" setting cannot be set through the API (see Privacy Settings below).
accountId✓ AppliesRequired. The id of the connected YouTube account from GET /social-accounts (Crosspostify's account ID, not the YouTube channel ID).title✓ AppliesOptional (empty becomes "Untitled Video"). The video title shown in search and on the watch page. Max 90 characters (longer text is cut); < and > are replaced with -.caption✓ AppliesOptional. Used as the video description. Supports links, hashtags and chapter timestamps. Max 2,200 characters (longer text is cut); < and > are replaced with -.youtube✓ AppliesYouTube only. Object with privacyStatus: "public" (default), "unlisted" or "private".is_aigc✗ IgnoredTikTok, Instagram and Facebook only — ignored for YouTube.link✗ IgnoredPinterest and Tumblr only — ignored for YouTube.thumbnailTimestamp✗ IgnoredTikTok only — ignored for YouTube (YouTube creates the thumbnail).facebookFirstComment✗ IgnoredFacebook only — ignored for YouTube.textFormatPresetId✗ IgnoredFacebook only — ignored for YouTube.boardId✗ IgnoredPinterest only — ignored for YouTube.tiktok / instagram / facebook✗ IgnoredSettings for those platforms — ignored for YouTube.Supported Endpoints
YouTube is video-only. Both regular videos and Shorts use the same /post/video endpoint. Crosspostify sends no Shorts flag; YouTube decides which uploads become Shorts.
Only video uploads are supported for YouTube. A YouTube account on /post/image or /post/images gets 400 "Unsupported platforms", and /post/text accepts Facebook and Threads only. Community posts are not available through the Crosspostify API.
/post/videoLong-form VideoUpload a long-form video to a YouTube channel with a title, a description and a privacy setting.
YouTube Video Notes
titleis optional but recommended: an empty title becomes "Untitled Video". Max 90 characters (longer text is cut)captionmaps to the YouTube video description field- Add chapter timestamps in the description (e.g.
00:00 Intro) for automatic chapter markers - Use
youtube.privacyStatus"private"or"unlisted"to upload without making the video public, then review it before going public - Upload your video first via
POST /mediaand pass the returnedidasmediaId scheduledDatetakes any ISO 8601 date-time in the future:Zor an offset such as+01:00(converted to UTC). Without an offset it is read as UTC.- Once published,
GET /postsshows thepostUrlhttps://www.youtube.com/watch?v=<id>
Request Body
mediaIdstringrequiredThe id of the uploaded video file, returned by POST /media.
scheduledDatestringoptionalOptional. Any ISO 8601 date-time in the future, e.g. 2030-01-15T10:00:00Z (Z or an offset like +01:00; without a zone it is read as UTC). Omit it (or send null) to post immediately. The video is uploaded to YouTube at the scheduled time (within about a minute), not before, with the privacyStatus you set.
postsarrayrequiredArray of post objects, one per YouTube account.
posts[].accountIdstringrequiredThe id of the connected YouTube account from GET /social-accounts (Crosspostify's account ID, not the YouTube channel ID).
posts[].titlestringoptionalThe video title. Optional (empty becomes "Untitled Video"). Max 90 characters (longer text is cut); < and > are replaced with -.
posts[].captionstringoptionalOptional (default empty). The video description. Supports plain text, links, hashtags and chapter timestamps. Max 2,200 characters (longer text is cut); < and > are replaced with -.
posts[].youtubeobjectoptionalYouTube settings. Only key: privacyStatus. Anything other than an object gives 400 (see Privacy Settings).
posts[].youtube.privacyStatusstringoptional"public" (default), "unlisted" or "private". Case-insensitive. Any other value gives 400 "Invalid youtube.privacyStatus".
Response
202 Accepted. status is SCHEDULED because the request has a scheduledDate (without one it is QUEUED). The upload happens afterwards: check the result with GET /posts?id=<id> (PROCESSING, then PUBLISHED or FAILED with error).
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": "2030-01-15T10: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",
"youtube": {
"privacyStatus": "unlisted"
}
}
]
}'/post/videoYouTube ShortsUpload a YouTube Short using the same /post/video endpoint. There is no Shorts flag: YouTube decides whether an upload is a Short, based on its length and aspect ratio.
YouTube Shorts Classification
- YouTube treats short, vertical videos as Shorts. YouTube sets the maximum Shorts length; check YouTube's current rules
- Adding
#Shortsto the title or description may help YouTube classify it - Shorts appear in the dedicated Shorts feed and on the channel's Shorts tab
titleis optional but recommended — keep it punchy (max 90 characters via Crosspostify)youtube.privacyStatusworks for Shorts the same way as for long-form videos
Request Body
mediaIdstringrequiredThe id of the uploaded short video file, returned by POST /media. Crosspostify does not check length or aspect ratio; YouTube decides whether it becomes a Short.
scheduledDatestringoptionalOptional. Any ISO 8601 date-time in the future, e.g. 2030-01-15T10:00:00Z (Z or an offset like +01:00; without a zone it is read as UTC). Omit it (or send null) to post immediately. The Short is uploaded at the scheduled time, not before.
postsarrayrequiredArray of post objects, one per YouTube account.
posts[].accountIdstringrequiredThe id of the connected YouTube account from GET /social-accounts (Crosspostify's account ID, not the YouTube channel ID).
posts[].titlestringoptionalThe Short title. Optional (empty becomes "Untitled Video"). Including "#Shorts" may help YouTube classify it. Max 90 characters (longer text is cut).
posts[].captionstringoptionalOptional (default empty). The Short description. Max 2,200 characters (longer text is cut); < and > are replaced with -.
posts[].youtube.privacyStatusstringoptional"public" (default), "unlisted" or "private". Case-insensitive. See Privacy Settings.
Response
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": "2030-01-15T10: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 Settings
Set the visibility of each upload with posts[].youtube.privacyStatus on /post/video. The value is case-insensitive. If you leave it out (or send null), the video is public.
publicunlistedprivateValidation Errors
Both errors reject the whole request with 400; nothing is posted.
With scheduledDate, Crosspostify keeps the post SCHEDULED and uploads the video within about a minute of the scheduled time, with the privacyStatus you set. Nothing is uploaded to YouTube early.
Every upload is filed under category 22 (People & Blogs), gets no tags, and is declared "not made for kids". These cannot be changed through the API. If a video is made for kids, change its audience setting in YouTube Studio after the upload.
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 or MOV (H.264 + AAC recommended)
- Max file size: 100 MB via Crosspostify
- Recommended resolution: 1080p or 4K
- Recommended ratio: 16:9 (landscape)
- Recommended frame rate: 24, 25, 30, 48, 50, or 60fps
YouTube Shorts Requirements
- YouTube decides the maximum Shorts length
- Recommended aspect ratio: 9:16 (vertical)
- Recommended resolution: 1080×1920px
- Format: MP4 or MOV (H.264 + AAC recommended)
- Max file size: 100 MB via Crosspostify
- #Shorts in the title or description may help
Title & Description Tips
- Title: max 90 characters via Crosspostify (longer is cut)
- Description: max 2,200 characters via Crosspostify (longer is cut)
- < and > in title and description are replaced with -
- 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
Scheduling
- Any future time works: no minimum lead time
- ISO 8601 with Z or an offset (e.g. +01:00); no offset = UTC
- Omit scheduledDate to publish immediately
- Uploaded within about a minute of the scheduled time
- No maximum scheduling window