YouTube
Options for posting via the API to YouTube
YouTube posting requires your YouTube account to have at least one Channel and be an owner on the Channel. To create a YouTube Channel, click on you profile in the YouTube Dashboard and choose "Create a Channel".
Posting to YouTube requires the
youTubeOptions
object with at least a title
set. The title
is the only required field. For example, to post a YouTube video with default settings:{
"post": "My Best YouTube Description", // required: Video description
"platforms": ["youtube"], // required
"mediaUrls": ["https://img.ayrshare.com/012/vid.mp4"], // required: URL of video, 1 allowed
"youTubeOptions": {
"title": "Your Best Title" // required: Video Title, max 100 characters. Must be 100 characters or less.
}
}
There are several other optional fields listed below, including the video
visibility
, tags
, and publishAt
date. Please see the comments for requirements and descriptions. {
"post": "My Best YouTube Description", // required: Video description
"platforms": ["youtube"], // required
"mediaUrls": ["https://img.ayrshare.com/012/vid.mp4"], // required: URL of video, 1 allowed
"youTubeOptions": {
"title": "Your Best Title", // required: Video Title, max 100 characters. Must be 100 characters or less.
"visibility": "private", // optional: "public", "unlisted", or "private" - default "private".
// Important Thumbnail information below
"thumbNail": "https://img.ayrshare.com/012/gb.jpg", // optional: URL of a JPEG or PNG and less than 2MB. Extension must end in png, jpg, or jpeg
"playListId": "PLrav6EfwgDX5peD7Ni-pOKa7B13WjLyUB", // optional: Playlist ID to add the video.
"tags": ["dancing", "dogs"], // optional: array of tags, length limit 400 characters combined. E.g. ["abc", "12"] is characters length 5. Must be at least 2 characters long.
"madeForKids": false, // optional: self declared made for kids. Default false.
"shorts": true, // optional: Post the video as a "Shorts". Video duration must be 60 seconds on less. Will add the #Shorts hashtag to the description.
"notifySubscribers": true, // optional: Default: true. Whether YouTube should send a notification about the new video to users who subscribe to the video's channel.
// optional: You may specify a time to publish on YouTube. The video will be sent to YouTube. Visibility automatically set to "private".
// Format: Accepts a UTC datetime. For example, use format "YYYY-MM-DDThh:mm:ssZ" and send as "2023-07-08T12:30:00Z".
"publishAt": "2022-10-08T21:18:36Z"
}
}
⮕ The
title
must be 100 characters or less. The post
must be 5,000 characters or less. The post
and title
may contain any characters except < and >.⮕ The Playlist Id can be found by opening the playlist in a browser and copying the value after
list=
. The authenticated user and channel must be the owner of the playlist to add videos.⮕ If your video doesn't end in a known video extension such as mp4, please use the
isVideo
parameter. See the /post endpoint for details.You can post a YouTube Shorts video by adding the
shorts
parameter to the youTubeOptions
:"shorts": true
The #Shorts hashtag will be added to the YouTube description. The video must also be 60 seconds or less and have a square or vertical aspect ration to be considered a short.
Thumbnails and other features, such as uploading 15 minute videos, require verification of your phone number. A
thumbNail
is a URL of a JPEG or PNG and less than 2MB in size. Extension must end in png, jpg, or jpeg.{
"thumbNail": "https://img.ayrshare.com/012/gb.jpg"
}
You must be granted YouTube permissions to post thumbnails. In YouTube Studio go to Settings->Channel. Select "Feature Eligibility" and click "Features that require phone verification". Enter your phone number to enable.

YouTube may take up to 24 hours to enable thumbnails after you verify your phone number. Please note, YouTube determines eligibility for adding thumbnails. "Enabled" phone verification does not guarantee YouTube will allow thumbnail uploads. If you are still having issues, please see this video on solving the Thumbnail issue.
How to Post via the API
YouTube limits how many videos a channel can upload in a 24-hour period via the YouTube API.
- Depending on a creator’s location, a channel might be able to increase their daily limit by getting access to advanced features. To learn more visit this article.
- Limits may vary by country/region or channel history. Copyright strikes may impact channel history eligibility and Community Guidelines strikes will affect how much a channel can upload.
If you receive and upload limit error please wait and try again in 24 hours.
You must activate Advanced Features in YouTube Studio to have clickable links in the YouTube video description.
Go to YouTube Studio -> Settings -> Channel -> Feature Eligibility -> Advanced Features -> Access Features to activate the advanced features.

Last modified 17d ago