YouTube Posting API
Upload videos to YouTube with title, description and privacy set, without writing the upload flow yourself.
- Video uploads with title, description and privacy
- Large files uploaded in resumable chunks
- Channels connect through Google's login
- A webhook when YouTube finishes processing
const pk = new Postkey(process.env.POSTKEY_KEY);
await pk.posts.create({
accounts: [
"acc_yt_654"
],
content: "Full walkthrough of the v2 dashboard, chapters in the description.",
media: [
{
type: "video",
url: "https://cdn.example.com/walkthrough.mp4"
}
],
youtube: {
title: "Postkey v2 dashboard walkthrough",
privacy: "public",
madeForKids: false
}
});- YouTubeprocessing
YouTube is processing it · webhook on finish
Your first YouTube post in three steps
- 1
Connect YouTube
Your customer signs in through YouTube's own login. You get an account ID, never a password.
- 2
Make a key
Create a key for that customer or agent, scoped to their accounts, with the caps you choose.
- 3
Post
Send the post to /v1/posts with that key. The YouTube result comes back in the response and by webhook.
Every YouTube format, one endpoint
Pick a format to see the exact request and what comes back. Options that only make sense on YouTube sit under "youtube".
A regular upload with title, description and privacy.
1POST https://api.postkey.dev/v1/posts2Authorization: Bearer pk_cust_42_…3Content-Type: application/json4 5{6 "accounts": [7 "acc_yt_654"8 ],9 "content": "Full walkthrough of the v2 dashboard, chapters in the description.",10 "media": [11 {12 "type": "video",13 "url": "https://cdn.example.com/walkthrough.mp4"14 }15 ],16 "youtube": {17 "title": "Postkey v2 dashboard walkthrough",18 "privacy": "public",19 "madeForKids": false20 }21}202 · processing
YouTube processes this first. The final result arrives by webhook.
{
"id": "post_3k9d2",
"status": "processing",
"results": [
{
"account": "acc_yt_654",
"platform": "youtube",
"status": "processing"
}
]
}Everything you need for YouTube posting
Checked against YouTube's rules
Before anything is sent, Postkey checks it against YouTube's published limits:
Resumable uploads
Big files go up in chunks and pick up where they stopped if the connection drops. You just send a URL or a file.
Privacy and audience
Set public, unlisted or private, and the made-for-kids flag YouTube requires, in the same call.
Processing tracked
YouTube processes every upload. You get a webhook when the video is ready, or the reason it was rejected.
Quota-aware caps
Uploads use a large share of YouTube's daily API quota. Per-key caps keep one customer or agent from spending it all.
Google login
Channel owners connect through Google's own consent screen. You never see their password.
Also for YouTube
Keys & control
Every YouTube post has an owner
Each customer or agent posts to YouTube through its own key: only its accounts, its own caps, its own log, and an off switch that touches nothing else.
Works with your stack
Your code
Node and Python SDKs with the same calls, or plain REST from anything that speaks HTTP.
- Node
- Python
- {}REST
No-code tools
Call the REST API from an HTTP step in n8n, Make or Zapier. Give each workflow its own key.
- n8n
- Make
- Zapier
AI agents & MCP
The MCP server lets Claude, Cursor and other agent tools post through their own key, with caps they can't change.
- MCP server
Beyond YouTube
Same request shape on every platform. Add an account ID and the post goes there too.
- X Posting APIText · Image · Video · Thread
- Instagram Posting APIFeed post · Reel · Story · Carousel
- Facebook Posting APIText · Photo · Video
- TikTok Posting APIVideo · Photo
- LinkedIn Posting APIText · Image · Document
- You're hereYouTube Posting APIVideo
- YouTube Shorts Posting APIShort
- Pinterest Posting APIPin
- Google Business Posting APIUpdate post · Offer · Event
YouTube posting questions
Something not here? Email hello@postkey.dev.
What can I upload to YouTube?
Regular videos with title, description, privacy and the made-for-kids setting. For vertical short clips, see the YouTube Shorts page.
Why does the response say 'processing'?
YouTube processes every upload before it's watchable. The call returns right away and a webhook follows when it's done.
Why would an upload end up private?
YouTube locks uploads from API projects that haven't passed its audit to private. It's a YouTube rule for all API apps.
Can I set the publish time on YouTube itself?
Yes. Use the scheduling API and the video is uploaded as private with a publish time, so YouTube makes it public on time.
Do large files work?
Yes. Uploads are resumable, so a dropped connection doesn't mean starting over.
Can I schedule YouTube posts instead?
Yes. Add scheduledFor to the same request. See the YouTube Scheduling API page for details.
Post to YouTube with a key per customer.
Get a key, connect an account, send the request above.
Free to start. Read the docs