Skip to content

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.

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:

Terminal window
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:

Terminal window
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 }
]
}
Platform IDyoutube
Formatspost (channel video)
Character limit5,000 (description); title 100
MediaRequired — video only
CommentsComing soon
Direct messagesNo
Post chainsNo
ParameterTypeRequiredDescription
privacy_statusstringNopublic, unlisted, or private (defaults to public)
titlestringNoVideo title (max 100 characters)
cover_url / cover_filestring / fileNoCustom thumbnail (requires a verified YouTube account)
made_for_kidsbooleanNoWhether the video is made for kids
tagsarrayNoTags for the video
category_idstringNoYouTube category ID (defaults to "22", People & Blogs)
contains_synthetic_mediabooleanNoDisclose altered or AI-generated content
MediaMax sizeFormatsCountDuration
Video256 GBmp4, mov, avi, wmv, flv, 3gp11 s+
  • A video is required; images are not accepted.
  • The post body becomes the video description.
ValueVisibility
publicEveryone
unlistedAnyone with the link
privateOnly you
Terminal window
# Public upload with a custom thumbnail
curl -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"
}
}
}'
Terminal window
# Unlisted upload with tags and a category
curl -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
}
}
}'

Coming soon. Comment list, reply, hide, and delete support for YouTube is in progress. When live, comments will be managed through the Comments API.

Not supported.

Postproxy records periodic stat snapshots you can pull as a timeseries; field names pass through from YouTube unchanged.

Channel-level metrics, refreshed roughly every 23 hours via the Profile stats endpoint (GET /api/profiles/:id/stats).

Fields: subscriberCount, viewCount, videoCount

Terminal window
# Fetch the profile stats timeseries
curl "https://api.postproxy.dev/api/profiles/prof_abc123/stats" \
-H "Authorization: Bearer YOUR_API_KEY"

Per-video engagement, captured after publish via the Post stats endpoint (GET /api/posts/stats).

Fields: impressions, likes, comments, saved

Terminal window
# Fetch post stats
curl "https://api.postproxy.dev/api/posts/stats?post_ids=post_abc123&profiles=youtube" \
-H "Authorization: Bearer YOUR_API_KEY"

Subscribe with the Webhooks API:

Terminal window
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:

EventWhen
post.processedA post is ready to publish
platform_post.publishedA post was published to the platform
platform_post.failedA post failed to publish (retries exhausted)
platform_post.failed_waiting_for_retryA publish attempt failed; will retry
platform_post.insightsNew analytics snapshot
profile.connected / .disconnectedConnection state changed
profile.statsNew profile stats snapshot
media.failedA media attachment failed to process
  • privacy_status is optional and defaults to public when omitted.
  • A custom thumbnail (cover_url / cover_file) requires a verified YouTube account.
  • Set contains_synthetic_media: true to disclose AI-generated or altered content, per YouTube policy.