Skip to main content
GET
/
schedule
Get Schedule
curl --request GET \
  --url https://api.example.com/schedule
{
  "schedule": [
    {
      "schedule[].contentId": "<string>",
      "schedule[].title": "<string>",
      "schedule[].scheduledPublishTime": "<string>",
      "schedule[].status": "<string>",
      "schedule[].topic": "<string>",
      "schedule[].createdAt": "<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.

Endpoint

GET /schedule

Description

Retrieves the upcoming content publishing schedule from the database. This endpoint returns all content that has been generated and is scheduled for future publishing, allowing you to view what content will be automatically posted and when.

Request

No parameters required.

Headers

No special headers required.

Response

Returns an array of scheduled content items. The exact structure depends on the database schema, but typically includes:
schedule
array
Array of scheduled content items.
schedule[].contentId
string
Unique identifier for the content.
schedule[].title
string
Video title.
schedule[].scheduledPublishTime
string
ISO 8601 timestamp for scheduled publishing.
schedule[].status
string
Current status: "scheduled", "published", "processing", etc.
schedule[].topic
string
Content topic or theme.
schedule[].createdAt
string
When the content was generated.
error
string
Error message if the request fails.

Example Request

curl http://localhost:3456/schedule

Example Response

Success

[
  {
    "contentId": "content_1234567890abcdef",
    "title": "Master React Hooks in 10 Minutes - Complete Guide for Beginners",
    "topic": "React Hooks Tutorial",
    "scheduledPublishTime": "2026-03-06T14:00:00.000Z",
    "status": "scheduled",
    "createdAt": "2026-03-05T10:30:45.123Z",
    "thumbnailUrl": "/thumbnails/content_1234567890abcdef.png",
    "description": "Learn React Hooks from scratch..."
  },
  {
    "contentId": "content_fedcba0987654321",
    "title": "10 Python Tips Every Developer Should Know",
    "topic": "Python Programming",
    "scheduledPublishTime": "2026-03-07T14:00:00.000Z",
    "status": "scheduled",
    "createdAt": "2026-03-05T08:15:30.456Z",
    "thumbnailUrl": "/thumbnails/content_fedcba0987654321.png",
    "description": "Boost your Python productivity..."
  }
]

Error

{
  "error": "Database connection failed"
}

Response Codes

Status CodeDescription
200Schedule retrieved successfully
500Server error retrieving schedule

Use Cases

Display Upcoming Content

Build a dashboard showing upcoming publications:
async function displaySchedule() {
  const response = await fetch('http://localhost:3456/schedule');
  const schedule = await response.json();
  
  schedule.forEach(item => {
    const publishDate = new Date(item.scheduledPublishTime);
    console.log(`${publishDate.toLocaleDateString()}: ${item.title}`);
  });
}

Check Content Pipeline

Verify you have enough content scheduled:
# Count scheduled items
curl -s http://localhost:3456/schedule | jq 'length'

# Show next 3 scheduled items
curl -s http://localhost:3456/schedule | jq '.[0:3]'

Calendar Integration

Export schedule to calendar format:
import requests
from datetime import datetime

response = requests.get('http://localhost:3456/schedule')
schedule = response.json()

for item in schedule:
    dt = datetime.fromisoformat(item['scheduledPublishTime'].replace('Z', '+00:00'))
    print(f"Event: {item['title']}")
    print(f"Date: {dt.strftime('%Y-%m-%d %H:%M')}")
    print("---")

Monitoring and Alerts

Set up alerts when schedule is running low:
async function checkScheduleHealth() {
  const response = await fetch('http://localhost:3456/schedule');
  const schedule = await response.json();
  
  if (schedule.length < 3) {
    console.warn('⚠️  Low content inventory! Only', schedule.length, 'items scheduled');
    // Trigger alert or auto-generate more content
  }
}
The schedule is automatically managed by the Daily Automation system. Content is generated daily and scheduled according to your optimal posting times determined by the Analytics & Optimization Agent.

Filtering and Sorting

The endpoint returns all upcoming scheduled content. You can filter and sort on the client side:
// Get only content scheduled for next 7 days
const response = await fetch('http://localhost:3456/schedule');
const schedule = await response.json();

const nextWeek = Date.now() + (7 * 24 * 60 * 60 * 1000);
const upcomingWeek = schedule.filter(item => {
  const publishTime = new Date(item.scheduledPublishTime).getTime();
  return publishTime <= nextWeek;
});

console.log(`${upcomingWeek.length} videos scheduled for next week`);

Build docs developers (and LLMs) love