YouTube API: upload videos and Shorts with APIWings
Status: coming soon. The APIWings integration with YouTube is in review: it opens to beta teams once the network approves it. This page describes how it works.
Accounts
A YouTube channel: the channel of a personal Google account or a brand channel. When a Google account manages several channels, Google asks which one to share. A Google account without a channel cannot be connected (create the channel on youtube.com first).
Connecting
POST /v1/profiles/{id}/connect/youtube returns a connect_url. The user signs in with Google and allows APIWings to upload videos and read the channel's basic data (youtube.upload, youtube.readonly). If the user unticks the upload permission, the connection fails and asks them to try again with it ticked.
Access tokens last one hour and are renewed automatically with Google's refresh token. The user only reconnects if they remove APIWings from their Google account's third-party access.
Supported content
| Rule | |
|---|---|
| Video | Exactly one video and no images. MP4 or MOV, up to 1 GB through APIWings (YouTube itself allows 256 GB and more formats). |
| Title | options.title, or else the first non-empty line of content, cut at a word boundary with "…" if it is longer than 100 characters. Up to 100 characters, without < or >. A title is required: send options.title or some text. |
| Description | The whole content, up to 5,000 bytes (UTF-8: accented letters and emoji take more than one byte), without < or >. |
| Shorts | There is no Shorts flag in the API: YouTube makes a video a Short when it is vertical or square and up to 3 minutes long. |
The file is sent to YouTube with a resumable upload in 16 MiB pieces: a failed piece resumes where YouTube says it stopped instead of starting again. After the upload APIWings waits up to 60 seconds for YouTube to accept or reject the file.
Options
| Option | Type | Default | Meaning |
|---|---|---|---|
title |
string | first line of content |
Video title, up to 100 characters. |
privacy_status |
string | "public" |
"public", "unlisted" (only people with the link) or "private". The requested value: the result says what YouTube applied. |
made_for_kids |
boolean | false |
Declares the video as made for kids (YouTube's audience setting). |
tags |
array of strings | none | Keywords. Up to 500 characters in total, counting a comma between tags and quotes around tags that contain spaces. |
category_id |
string of digits | "22" (People & Blogs) |
YouTube video category id. |
notify_subscribers |
boolean | true |
Notify the channel's subscribers about the new video. |
contains_synthetic_media |
boolean | false |
Declares realistic altered or synthetic (for example AI-generated) content. |
Unknown options are refused (validation_failed).
{ "platform": "youtube", "options": { "title": "Spring collection in 60 seconds", "privacy_status": "unlisted", "tags": ["fashion", "spring 2027"] } }
Result and visibility
visibility: the privacy status YouTube reports for the video after the upload:public,unlistedorprivate. It can differ from the requestedprivacy_status: Google documents that uploads from API projects it has not verified can be locked to private. APIWings reports what YouTube says.url:https://www.youtube.com/watch?v=<id>.
Limits
The YouTube API quota belongs to the APIWings Google project and is shared by all customers; every upload uses a large share of it. Each channel also has its own daily upload limit. GET /v1/accounts/{id}/limits returns this as a note (YouTube has no per-channel counter).
Errors
| When | Code |
|---|---|
No video, more than one file, images, a missing or too long title, < or >, description over 5,000 bytes, invalid option values or tags over 500 characters |
validation_failed (when creating the post) |
| A video that is not MP4 or MOV | media_invalid (when creating the post) |
| YouTube rejects the title, description, tags or category | validation_failed |
| YouTube rejected the video (for example a duplicate or a policy issue) | platform_rejected |
| YouTube could not process the file | media_invalid |
| APIWings' daily YouTube quota is used up | rate_limited (not retried; the quota resets at midnight Pacific time) |
| The channel reached its upload limit | rate_limited (not retried; try again in 24 hours) |
| The Google account has no YouTube channel | platform_rejected |
| Access revoked | auth_expired, then account.disconnected |
| YouTube unavailable | platform_down (retried) |
