Upload and publish a video to YouTube on behalf of a connected eranol.com account.
Uploads and publishes a video to YouTube on behalf of a connected eranol.com account, using the YouTube Data API v3 resumable upload flow. Can be published immediately or scheduled for a future time.
Before this endpoint can be used, the target account must have connected YouTube via Dashboard → Social Media → Connect (OAuth 2.0, youtube.upload scope). Calls for an account with no active YouTube connection return a 400 error.
Note: Until the connected Google app passes verification for the youtube.upload scope, YouTube forces every uploaded video to private regardless of the privacy_status sent here.
POST https://eranol.com/api/v1/social/youtube/publish
| Field | Type | Required | Notes |
|---|---|---|---|
video_url | string | Yes | Video URL. Must be hosted on eranol.com or www.eranol.com — external URLs are rejected |
title | string | Yes | Up to 100 characters |
description | string | No | Up to 5000 characters |
tags | string[] | No | Up to 30 tags |
category_id | string | No | YouTube category id. Defaults to 22 (People & Blogs) |
privacy_status | string | Yes | public, unlisted, or private |
made_for_kids | boolean | No | Required by law (COPPA) if the content is made for kids. Defaults to false |
scheduled_for | string | No | ISO 8601 timestamp in the future — see Scheduling below |
Pass scheduled_for as a future ISO 8601 timestamp to queue the post instead of publishing it right away. Scheduled posts:
202 Accepted instead of 200, with { success: true, scheduled: true, scheduled_post_id, scheduled_for } instead of the normal publish resultscheduled-posts endpoints for this platform{
"video_url": "https://www.eranol.com/uploads/video.mp4",
"title": "My video title",
"description": "Video description here",
"tags": ["tutorial", "demo"],
"category_id": "22",
"privacy_status": "public",
"made_for_kids": false
}
{
"video_url": "https://www.eranol.com/uploads/video.mp4",
"title": "Coming soon",
"privacy_status": "public",
"scheduled_for": "2026-09-01T15:00:00Z"
}
{
"success": true,
"youtube_video_id": "dQw4w9WgXcQ",
"watch_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"log_id": "b7e1c2a4-..."
}
{
"success": true,
"scheduled": true,
"scheduled_post_id": "a1b2c3d4-...",
"scheduled_for": "2026-09-01T15:00:00.000Z"
}
| Status | Meaning |
|---|---|
400 | Missing/invalid video_url, title, or privacy_status, video_url not hosted on eranol.com, invalid/past scheduled_for, or the account has no connected YouTube account |
401 | Missing or invalid API key, or YouTube rejected the request — the connection's token may need to be refreshed by reconnecting via the dashboard |
402 | Insufficient credits |
502 | YouTube's API rejected the upload, or the source video couldn't be fetched |