YouTube upload and analytics API
YouTube Video Upload API for Content Teams
YouTube publishing in Wahdx Connection connects a channel through Google OAuth and uploads video with the metadata the channel needs. YouTube classifies the upload from the video itself, so vertical videos under 3 minutes become Shorts while longer or landscape videos publish as regular uploads. This page covers what the API can do, the channel connection, the video requirements, the publish sequence, and the analytics you can read back.
What the YouTube API can do
The API uploads video to a connected channel, applies per-video settings such as title, description, privacy, made-for-kids, and category, and schedules the upload up to 7 days ahead. Status tracking reports queued, processing, published, or failed per video. After publishing, analytics return channel-level numbers and per-video performance, all tied to the channel that published rather than merged with other platforms.
- Video upload through Google OAuth.
- Per-video settings: title, description, privacy, made-for-kids, category.
- Shorts detected automatically from the video format.
- Schedule up to 7 days ahead.
- Channel and per-video analytics after publishing.
Channel connection with Google OAuth
A YouTube channel connects through Google OAuth, so the user approves the scopes the integration requests. The connected channel then appears in the account listing endpoint with an accountId used for uploads. Analytics need the channel connection and the insights permission granted at connect time; without it, metric fields return null. If a channel connection expires, the listing keeps returning it with an expired status so the interface can prompt for reconnection before a scheduled upload runs.
YouTube video requirements
Video uploads follow the same format profile as the other platforms. Vertical video under 3 minutes is classified as a Short, while longer or landscape video publishes as a regular upload, and the API supports both without a separate endpoint. Title, description, privacy (public, private, or unlisted), made-for-kids, and category are set per video.
| Requirement | Value |
|---|---|
| Format | MP4 or MOV |
| Codec | H.264 recommended |
| Aspect ratio | 9:16 vertical for Shorts; landscape for regular uploads |
| Duration | Under 3 minutes vertical becomes a Short |
| Privacy | public, private, or unlisted |
| Category | Numeric category ID |
Publishing limits and scheduling
Uploads can be sent immediately or scheduled up to 7 days ahead. YouTube itself may hold an upload for processing after the API accepts it, and the status endpoint reports processing until the video is live. Scheduled posts are queued server-side, and only successful publishes count toward the monthly upload quota, so a rejected upload does not consume an upload credit.
Limitations to plan around
Two things shape how a YouTube integration feels in practice. The upload is classified by the video itself: a vertical video under 3 minutes becomes a Short, and anything longer or landscape publishes as a regular upload, so the format decides the destination rather than a separate endpoint. And YouTube still processes the video after accepting it, so a post can sit in processing for a while before the public URL appears; the status endpoint reports that state instead of leaving the integration to guess. A failed upload stays visible in status tracking and only a retry with corrected media brings it back. Title, description, privacy, made-for-kids, and category are chosen per video, which keeps the workflow the same whether a channel posts a Short from a phone or a full-length announcement from a studio.
Publish sequence: endpoint to endpoint
A YouTube upload is three calls. List connected accounts to find the channel accountId. Send the video to POST /api/content/post with the platform set to youtube and one video URL in mediaItems, plus the video settings. Then poll GET /api/content/status/:accountId/:publishId until the video is published or failed. The response includes the public video URL once YouTube finishes processing.
POST /api/content/post
X-API-Key: <server-side key>
Content-Type: application/json
{
"platform": "youtube",
"accountId": "CONNECTED_ACCOUNT_ID",
"content": "Video description",
"mediaItems": [{ "url": "https://your-domain.com/video.mp4" }]
}Reading metrics back
Channel analytics cover subscribers, views, and video count, with per-video performance for individual uploads. The numbers come from YouTube for the connected channel, so they stay separate from TikTok, Instagram, Threads, and Facebook metrics. Combining them with the publishing analytics endpoint shows both the upload volume and the audience response for the same channel.
FAQ
Common questions about the YouTube API
Can I publish YouTube videos from an API?
Yes. The API is built for server-side integrations that need controlled uploads and status monitoring.
Are uploads published as Shorts or regular videos?
YouTube classifies the upload automatically: vertical videos under 3 minutes become Shorts, while longer or landscape videos publish as regular uploads.
Does YouTube analytics require a separate permission?
Yes. Channel and video analytics are accessed through the scopes you approve when connecting the channel.
Can I schedule a YouTube upload?
Yes, up to 7 days ahead. The video is queued server-side and the status endpoint reports progress until it is live.
Related reading
Go deeper on this workflow.
Related API docs
TikTok Content Publishing API: Video, Photos & Carousels
Publish video and photo carousels to TikTok through an official API. Media specs, posting limits, QR login, scheduling, and status tracking in one workflow.
Instagram Graph API Content Publishing for Business Accounts
Publish photos, reels, and carousels to Instagram with the Content Publishing API. Business account requirements, media limits, and metrics.
Threads API: Text Posts, Thread Sequences & Metrics
Publish text posts and thread sequences to Threads via API. Character limits, scopes, reply settings, rate limits, and metrics read-back.
Facebook Graph API Page Publishing and Insights
Publish to Facebook Pages and read back unique impressions, post engagements, page views, and follows through one API workflow for content teams.