Content Calendar Generation API
This API allows you to generate a 7-day or 30-day content calendar using AI, based on various content sources such as a prompt, YouTube video, articles, or a PDF.
Base URL: https://server.feedboss.ai/api/v1
Authentication
All endpoints require authentication. You can authenticate using a Service API Key.
Service API Key
Add your Service API Key to the x-api-key header.
x-api-key: fb_live_xxxxxxxxxxxxxxxxxxxxxxxx
Generate Content Calendar
Generates a content calendar with scheduled posts. The response is a Server-Sent Events (SSE) stream, providing real-time progress updates and the final result.
Endpoint: POST /content-calendar/generate/:workspaceId
Headers
| Header | Type | Description |
|---|---|---|
x-api-key | String | Service API Key (if using programmatic access) |
Content-Type | String | multipart/form-data (required if uploading PDF) or application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | String | Yes | The ID of the workspace where the calendar will be created. |
Body Parameters (Multipart/Form-Data or JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
calendarLength | Number | Yes | Duration of the calendar. Must be 7 or 30. |
prompt | String | No | A specific topic or instruction for the AI. |
youtubeUrl | String | No | URL of a YouTube video to use as source content. |
articleUrls | String/Array | No | Comma-separated URLs or array of article URLs to scrape. |
contentStyleId | String | No | ID of a Content Style Persona to apply. |
pdf | File | No | A PDF file to extract content from (Max 10MB). |
Constraint: You must provide at least one content source:
prompt,youtubeUrl,articleUrls, or
Response (Server-Sent Events)
The API returns a stream of events. Listen for the following event types:
Event: generation_started
Indicates the generation process has begun.
{
"calendarLength": 7,
"sources": [{ "type": "youtube", "title": "Video Title" }],
"message": "Generating 7 posts with thematic progression..."
}
Event: source_processing
Updates on content extraction status (YouTube, Articles, PDF).
{
"type": "youtube",
"status": "extracting", // or "complete"
"message": "Extracting YouTube video content..."
}
Event: calendar_progress
Updates on the AI generation and saving progress.
{
"current": 1,
"total": 7,
"status": "saving",
"message": "Saving Day 1: Hook & Problem Awareness...",
"postId": "60d5ecb..." // Included when status is "completed" for a post
}
Event: calendar_complete
Final event containing the generated calendar and summary.
{
"success": true,
"calendarLength": 7,
"summary": {
"total": 7,
"generated": 7,
"failed": 0
},
"posts": [
{
"index": 1,
"postId": "60d5ec...",
"conversationId": "60d5ed...",
"content": "Post content...",
"theme": "Hook & Problem Awareness",
"suggestedDate": "2023-10-27T10:00:00.000Z",
"status": "draft"
}
// ... more posts
]
}
Event: error
Sent if a critical error occurs.
"Failed to generate content calendar: [Error Details]"
Error Response
{
"success": false,
"message": "Some posts not found or not in draft status: 60d5..."
}