API documentation

Operational docs for generation, distribution, and response automation

ContentFlow exposes one API for posts, videos, accounts, analytics, bombs, comments, and webhook callbacks. Use this page as the human-readable front door, then link engineers to the FastAPI reference for low-level schemas when needed.

Authentication

Every request uses an API key

Send `X-API-Key` on every request. Production keys start with `cf_live_`; test keys start with `cf_test_`.

HTTP requestbash
01curl -X POST https://api.contentflow.sh/api/v1/posts
02 -H "Content-Type: application/json"
03 -H "X-API-Key: cf_live_replace_me"
04 -d '{
05 "text": "Launch post",
06 "platforms": ["youtube", "tiktok"],
07 "media_urls": ["https://cdn.example.com/video.mp4"]
08 }'
SDKs

Reference flows in Python and JavaScript

Python quickstartpython
01from contentflow import ContentFlow
02
03client = ContentFlow(api_key="cf_live_...")
04
05job = client.videos.generate(
06 topic="DUI 3-strike laws",
07 mode="legal",
08 language="ko",
09 auto_publish={
10 "enabled": True,
11 "platforms": ["youtube", "tiktok"]
12 }
13)
JavaScript quickstartjavascript
01import { ContentFlow } from "@contentflow/sdk"
02
03const client = new ContentFlow({ apiKey: "cf_live_..." })
04
05const post = await client.posts.create({
06 text: "Ship once. Distribute everywhere.",
07 platforms: ["youtube", "instagram", "threads"],
08 media_urls: ["https://cdn.example.com/video.mp4"]
09});
API surface

Primary endpoint groups

Posts API

Immediate publish, scheduling, status lookups, and cancellation.

  • POST /api/v1/posts
  • GET /api/v1/posts
  • GET /api/v1/posts/{id}
  • DELETE /api/v1/posts/{id}

Videos API

Generate through yt-factory, track status, and trigger auto-publish flows.

  • POST /api/v1/videos/generate
  • GET /api/v1/videos/{id}

Accounts API

OAuth connect flows and connected account inventory.

  • POST /api/v1/accounts/connect/{platform}
  • GET /api/v1/accounts
  • DELETE /api/v1/accounts/{id}

Signals

Analytics, bombs, comments, and webhook delivery hooks.

  • GET /api/v1/analytics
  • POST /api/v1/bombs
  • POST /api/v1/comments/collect
  • POST /api/v1/webhooks
Webhooks

Event delivery model

Webhooks are HMAC-signed and retried automatically. Current event coverage includes `post.published`, `video.completed`, `video.failed`, `account.connected`, and `account.disconnected`.

Recommended flow

  1. Create the asset or post job.
  2. Store the returned job or post identifier in your app.
  3. Subscribe to webhooks for completion and failure states.
  4. Use the status endpoints for fallback polling or dashboard refreshes.
Deployment

How this replaces contentflow-lovat.vercel.app

Deploy the `landing/` directory as the Vercel root project. The API stays where it is, while the marketing site and docs become the public entry point for the existing domain.

  • Set the Vercel project Root Directory to `landing`.
  • Use the included `landing/vercel.json` for install and build commands.
  • Point your marketing domain to this project and keep the API on its backend host.