YouTube API
Postproxy uploads videos to a connected YouTube channel. The post body becomes the video description; the video file is required.
Every request below uses the base URL https://api.postproxy.dev and an Authorization: Bearer YOUR_API_KEY header. Replace YOUR_API_KEY and the example IDs with your own.
Profiles and profile groups
Section titled “Profiles and profile groups”Every post targets one or more profiles. A profile is one connected account — for YouTube, a YouTube channel. Reference one in a request by its id (the prof_abc123 in the examples below) or by the platform name "youtube", which selects the group’s YouTube profile (a group holds at most one profile per platform). List what’s connected with GET /api/profiles.
Profiles live in profile groups — containers that organize the accounts for one brand, client, or project. List groups with GET /api/profile_groups, and connect a new YouTube profile with the Initialize Connection endpoint.
Example: get profiles and profile groups
List the profiles you can post to — GET /api/profiles:
curl -X GET "https://api.postproxy.dev/api/profiles" \ -H "Authorization: Bearer YOUR_API_KEY"{ "data": [ { "id": "prof_abc123", "name": "My Channel", "platform": "youtube", "status": "active", "profile_group_id": "grp_xyz789", "expires_at": null, "post_count": 31, "avatar_url": "https://cdn.postproxy.dev/uploads/avatar_prof_abc123.jpg" } ]}List your profile groups — GET /api/profile_groups:
curl -X GET "https://api.postproxy.dev/api/profile_groups" \ -H "Authorization: Bearer YOUR_API_KEY"{ "data": [ { "id": "grp_xyz789", "name": "Main Brand", "profiles_count": 5 }, { "id": "grp_def456", "name": "Client Project", "profiles_count": 3 } ]}At a glance
Section titled “At a glance”| Platform ID | youtube |
| Formats | post (channel video) |
| Character limit | 5,000 (description); title 100 |
| Media | Required — video only |
| Playlists | List, create, update, delete; publish into one with playlist_id — see Playlists |
| Comments | List, reply, edit, delete |
| Direct messages | No |
| Post chains | No |
Publishing
Section titled “Publishing”Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
privacy_status | string | No | public, unlisted, or private (defaults to public) |
title | string | No | Video title (max 100 characters) |
cover_url / cover_file | string / file | No | Custom thumbnail, 2 MB max (requires a verified YouTube account). Applied once YouTube finishes processing the video, shortly after the post is published; if YouTube rejects it, the post stays published and the cover attachment’s status becomes failed |
made_for_kids | boolean | No | Whether the video is made for kids |
tags | array | No | Tags for the video |
category_id | string | No | YouTube category ID (defaults to "22", People & Blogs) |
contains_synthetic_media | boolean | No | Disclose altered or AI-generated content |
playlist_id | string | No | Add the video to this playlist on the channel — see Playlists |
| Media | Max size | Formats | Count | Duration |
|---|---|---|---|---|
| Video | 256 GB | mp4, mov, avi, wmv, flv, 3gp | 1 | 1 s+ |
- A video is required; images are not accepted.
- The post
bodybecomes the video description.
Privacy status
Section titled “Privacy status”| Value | Visibility |
|---|---|
public | Everyone |
unlisted | Anyone with the link |
private | Only you |
# Public upload with a custom thumbnailcurl -X POST "https://api.postproxy.dev/api/posts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "post": { "body": "Check out our latest tutorial on building API integrations!" }, "profiles": ["prof_abc123"], "media": ["https://example.com/video.mp4"], "platforms": { "youtube": { "title": "How to Build an API Integration", "privacy_status": "public", "cover_url": "https://example.com/custom-thumbnail.jpg" } } }'# Unlisted upload with tags and a categorycurl -X POST "https://api.postproxy.dev/api/posts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "post": { "body": "Internal demo recording." }, "profiles": ["prof_abc123"], "media": ["https://example.com/demo.mp4"], "platforms": { "youtube": { "title": "Q3 Demo", "privacy_status": "unlisted", "tags": ["demo", "product"], "category_id": "28", "made_for_kids": false } } }'Playlists
Section titled “Playlists”List, create, update and delete playlists on the connected channel. A playlist’s id is the playlist_id you publish a video into.
Every endpoint is scoped to one connected profile:
/api/profiles/:profile_id/youtube/...No extra connection or scope is needed: any YouTube profile connected to Postproxy can use these endpoints. Playlist calls count against the channel’s YouTube Data API quota (creating, updating and deleting cost 50 units each).
| Method | Endpoint | Description |
|---|---|---|
GET | /api/profiles/:profile_id/youtube/playlists | List playlists |
POST | /api/profiles/:profile_id/youtube/create_playlist | Create a playlist |
PATCH | /api/profiles/:profile_id/youtube/update_playlist | Update a playlist |
DELETE | /api/profiles/:profile_id/youtube/delete_playlist | Delete a playlist |
Playlist object
Section titled “Playlist object”| Field | Type | Description |
|---|---|---|
id | string | YouTube playlist ID |
title | string | Playlist title |
description | string | Playlist description |
privacy_status | string | public, unlisted or private |
item_count | integer | Number of videos in the playlist |
thumbnail_url | string | null | Playlist thumbnail |
published_at | string | When the playlist was created (ISO 8601) |
List playlists
Section titled “List playlists”GET /api/profiles/:profile_id/youtube/playlists
| Parameter | Type | Required | Description |
|---|---|---|---|
page_token | string | No | next_page_token from the previous page |
curl "https://api.postproxy.dev/api/profiles/prof_abc123/youtube/playlists" \ -H "Authorization: Bearer YOUR_API_KEY"{ "data": [ { "id": "PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG", "title": "Tutorials", "description": "Step-by-step guides", "privacy_status": "public", "item_count": 12, "thumbnail_url": "https://i.ytimg.com/vi/abc123/hqdefault.jpg", "published_at": "2026-03-14T09:21:00.000Z" } ], "next_page_token": null}Up to 50 playlists per page. next_page_token is null on the last page.
Create playlist
Section titled “Create playlist”POST /api/profiles/:profile_id/youtube/create_playlist
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Playlist title (max 150 characters) |
description | string | No | Playlist description |
privacy_status | string | No | public (default), unlisted or private |
curl -X POST "https://api.postproxy.dev/api/profiles/prof_abc123/youtube/create_playlist" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Tutorials", "description": "Step-by-step guides", "privacy_status": "public" }'The response is the new playlist.
Update playlist
Section titled “Update playlist”PATCH /api/profiles/:profile_id/youtube/update_playlist
| Parameter | Type | Required | Description |
|---|---|---|---|
playlist_id | string | Yes | Playlist ID from List playlists |
title | string | No | New title |
description | string | No | New description. Pass "" to clear it |
privacy_status | string | No | public, unlisted or private |
Fields you leave out keep their current value.
curl -X PATCH "https://api.postproxy.dev/api/profiles/prof_abc123/youtube/update_playlist" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "playlist_id": "PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG", "privacy_status": "unlisted" }'The response is the updated playlist.
Delete playlist
Section titled “Delete playlist”DELETE /api/profiles/:profile_id/youtube/delete_playlist
| Parameter | Type | Required | Description |
|---|---|---|---|
playlist_id | string | Yes | Playlist ID from List playlists |
curl -X DELETE "https://api.postproxy.dev/api/profiles/prof_abc123/youtube/delete_playlist?playlist_id=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" \ -H "Authorization: Bearer YOUR_API_KEY"{ "deleted": true, "playlist_id": "PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG"}Deleting a playlist does not delete the videos in it.
Publish into a playlist
Section titled “Publish into a playlist”Pass playlist_id in the YouTube platform parameters:
curl -X POST "https://api.postproxy.dev/api/posts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "post": { "body": "A walkthrough of account setup." }, "profiles": ["prof_abc123"], "media": ["https://example.com/setup.mp4"], "platforms": { "youtube": { "title": "How to set up your account", "playlist_id": "PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" } } }'The playlist is checked before the video uploads, so an unknown playlist_id fails the post without uploading anything. If YouTube rejects adding the uploaded video to the playlist, the video is removed from the channel and the post fails.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 | Missing title or playlist_id, or an unknown privacy_status value |
403 | The connection lacks permission to manage playlists; reconnect the profile |
404 | Profile not found, or the playlist doesn’t exist on this channel |
422 | Profile is not a YouTube profile, the connection needs re-authentication, or YouTube rejected the request |
429 | YouTube quota or rate limit reached; retry after the Retry-After header |
502 | YouTube could not be reached |
Comments
Section titled “Comments”Comments on your published YouTube videos, including nested replies, sync into the Comments API. You can list comments, post top-level comments, reply, edit, and delete. Hide/unhide and like/unlike aren’t available — the YouTube Data API doesn’t offer them.
YouTube profiles connected before comments launched must be reconnected to grant the additional permission comment access requires. Until you reconnect, comment syncing stays off for that profile (posting is unaffected) and turns on automatically once you reconnect.
Direct messages
Section titled “Direct messages”Not supported.
Postproxy records periodic stat snapshots you can pull as a timeseries; field names pass through from YouTube unchanged.
Profile stats
Section titled “Profile stats”Channel-level metrics, refreshed roughly every 23 hours via the Profile stats endpoint (GET /api/profiles/:id/stats).
Fields: subscriberCount, viewCount, videoCount
# Fetch the profile stats timeseriescurl "https://api.postproxy.dev/api/profiles/prof_abc123/stats" \ -H "Authorization: Bearer YOUR_API_KEY"Post stats
Section titled “Post stats”Per-video engagement, captured after publish via the Post stats endpoint (GET /api/posts/stats).
Fields: impressions, likes, comments, saved
# Fetch post statscurl "https://api.postproxy.dev/api/posts/stats?post_ids=post_abc123&profiles=youtube" \ -H "Authorization: Bearer YOUR_API_KEY"Webhooks
Section titled “Webhooks”Subscribe with the Webhooks API:
curl -X POST "https://api.postproxy.dev/api/webhooks" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhooks/postproxy", "events": ["platform_post.published", "platform_post.failed", "platform_post.insights"] }'Events relevant to YouTube:
| Event | When |
|---|---|
post.processed | A post is ready to publish |
platform_post.published | A post was published to the platform |
platform_post.failed | A post failed to publish (retries exhausted) |
platform_post.failed_waiting_for_retry | A publish attempt failed; will retry |
platform_post.insights | New analytics snapshot |
profile.connected / .disconnected | Connection state changed |
profile.stats | New profile stats snapshot |
media.failed | A media attachment failed to process |
What you can’t do
Section titled “What you can’t do”YouTube’s API doesn’t expose these features, so they aren’t available through Postproxy:
- Publish Community posts.
- Start a live stream or schedule a Premiere.
- Add or upload captions and subtitles.
- Attach end screens, cards, or chapters (timestamps written into the description still work).
- Like or dislike videos.
- Change monetization settings.
privacy_statusis optional and defaults topublicwhen omitted.- A custom thumbnail (
cover_url/cover_file) must be 2 MB or smaller and requires a verified YouTube account. - Set
contains_synthetic_media: trueto disclose AI-generated or altered content, per YouTube policy. - YouTube allows roughly 100 uploads per day per Google Cloud project. For what that means when picking an automation setup, see How to automate YouTube uploads.