curl --request POST \
--url https://api.example.com/publish/:contentId{
"success": true,
"result": {
"result.videoId": "<string>",
"result.url": "<string>",
"result.status": "<string>",
"result.publishedAt": "<string>"
},
"error": "<string>"
}Manually publish content to YouTube
curl --request POST \
--url https://api.example.com/publish/:contentId{
"success": true,
"result": {
"result.videoId": "<string>",
"result.url": "<string>",
"result.status": "<string>",
"result.publishedAt": "<string>"
},
"error": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/darkzOGx/youtube-automation-agent/llms.txt
Use this file to discover all available pages before exploring further.
POST /publish/:contentId
/generate endpoint or can be retrieved from the /schedule endpoint.contentId.
Content-Type: application/json
success is false.curl -X POST http://localhost:3456/publish/content_1234567890abcdef \
-H "Content-Type: application/json"
{
"success": true,
"result": {
"videoId": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"status": "published",
"publishedAt": "2026-03-05T10:45:30.123Z",
"title": "Master React Hooks in 10 Minutes - Complete Guide for Beginners",
"visibility": "public"
}
}
{
"success": false,
"error": "Content not found: content_invalid123"
}
{
"success": false,
"error": "Content already published: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
{
"success": false,
"error": "YouTube API error: Daily upload limit exceeded"
}
| Status Code | Description |
|---|---|
| 200 | Publishing request processed (check success field) |
| 500 | Server error during publishing |
# Generate content
RESPONSE=$(curl -s -X POST http://localhost:3456/generate \
-H "Content-Type: application/json" \
-d '{"topic": "Breaking: Major Tech Announcement"}')
# Extract content ID
CONTENT_ID=$(echo $RESPONSE | jq -r '.result.contentId')
# Publish immediately
curl -X POST http://localhost:3456/publish/$CONTENT_ID \
-H "Content-Type: application/json"
async function approvalWorkflow(contentId) {
// Get content details
const scheduleResponse = await fetch('http://localhost:3456/schedule');
const schedule = await scheduleResponse.json();
const content = schedule.find(item => item.contentId === contentId);
// Show to human reviewer
console.log('Review content:', content.title);
const approved = await getUserApproval(); // Your approval UI
if (approved) {
// Publish immediately
const publishResponse = await fetch(
`http://localhost:3456/publish/${contentId}`,
{ method: 'POST', headers: { 'Content-Type': 'application/json' } }
);
const result = await publishResponse.json();
if (result.success) {
console.log('✅ Published:', result.result.url);
// Notify team, update CMS, etc.
}
}
}
import requests
import time
def batch_publish(content_ids):
results = []
for content_id in content_ids:
response = requests.post(
f'http://localhost:3456/publish/{content_id}',
headers={'Content-Type': 'application/json'}
)
result = response.json()
results.append(result)
if result['success']:
print(f"✅ Published: {result['result']['title']}")
else:
print(f"❌ Failed: {result['error']}")
# Wait between uploads to avoid rate limits
time.sleep(60)
return results
# Publish 3 videos
batch_publish([
'content_abc123',
'content_def456',
'content_ghi789'
])
async function publishEarly(contentId) {
// Check current schedule
const scheduleResponse = await fetch('http://localhost:3456/schedule');
const schedule = await scheduleResponse.json();
const content = schedule.find(item => item.contentId === contentId);
const scheduledTime = new Date(content.scheduledPublishTime);
console.log(`Originally scheduled for: ${scheduledTime}`);
// Publish now
const publishResponse = await fetch(
`http://localhost:3456/publish/${contentId}`,
{ method: 'POST', headers: { 'Content-Type': 'application/json' } }
);
const result = await publishResponse.json();
console.log(`Published early: ${result.result.url}`);
}
| Error | Cause | Solution |
|---|---|---|
| Content not found | Invalid contentId | Verify ID from /schedule or /generate |
| Already published | Content was previously published | Check database or use different content |
| Invalid credentials | YouTube API credentials missing/expired | Run npm run credentials:setup |
| Upload limit exceeded | Daily YouTube upload quota reached | Wait 24 hours or upgrade quota |
| File not found | Video file missing from storage | Regenerate content |
| Thumbnail upload failed | Thumbnail file corrupted | Regenerate thumbnail |