Skip to Content
ContentFlowDocs

API & webhooks

Start batches and fetch finished copies from your own tools, and get told when things happen.

The ContentFlow API lets your own tools start batches, fetch approved copies and read your credits. Webhooks tell your tools when something happens. Set both up in Settings → API & webhooks.

Only owners and managers can make API keys and webhooks. Everyone else sees the reference only.

API keys

A key acts as the person who made it, in this workspace. It stops working if they leave, and can only start batches while they are an owner or manager. Keep keys on your server, never in a browser or app.

When someone leaves the workspace or is removed, the keys they made there are revoked right away. Make a new key under someone who stays.

Click Create key and name it after where you'll use it, for example reporting script, so you know which one to revoke later. Up to 60 characters.

Copy the key from Copy your key now. This is the only time you see the full key. Keys start with cf_live_.

The list shows each key's start, who made it, and when it was last used. A workspace can have 20 active keys. Revoked keys don't count.

To stop a key, click Revoke and type its name to confirm. Anything using this key stops working right away. This can't be undone; you can make a new key.

Using the API

JSON over HTTPS. Send your key in the Authorization header. Lists are newest first: pass limit (up to 100) and the next_cursor you got back as cursor for the next page.

The base address is https://contentflow.gg/api/v1. The examples read your key from $CONTENTFLOW_KEY.

GET /api/v1/sources

Your uploaded clips. Filter with ?status=ready.

curl https://contentflow.gg/api/v1/sources?status=ready -H "Authorization: Bearer $CONTENTFLOW_KEY"

POST /api/v1/batches

Starts a batch, with the same rules and credit checks as the app. count is 1 to 200. recipe_id is one of your recipes, a starter like tpl:copies-only, or left out for your default recipe. The key's maker must still be an owner or manager. Answers 402 when credits run short.

curl -X POST https://contentflow.gg/api/v1/batches -H "Authorization: Bearer $CONTENTFLOW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source_id":"SOURCE_ID","count":20,"recipe_id":"tpl:copies-only","name":"Monday drop"}'

The starters are tpl:copies-only, tpl:ai-looks and tpl:ai-looks-hd, the same as the starter templates. name is optional, up to 120 characters.

GET /api/v1/batches

Batches with their status and credits. Filter with ?status=reviewing.

curl "https://contentflow.gg/api/v1/batches?limit=10" -H "Authorization: Bearer $CONTENTFLOW_KEY"

Statuses are queued, running, reviewing, done, paused, cancelled and failed.

GET /api/v1/batches/:id

One batch with its copies and download links that work for 1 hour.

curl https://contentflow.gg/api/v1/batches/BATCH_ID -H "Authorization: Bearer $CONTENTFLOW_KEY"

GET /api/v1/copies

Copies with download links. Use ?status=approved to fetch what your team approved, and batch_id for one batch.

curl "https://contentflow.gg/api/v1/copies?status=approved&limit=50" -H "Authorization: Bearer $CONTENTFLOW_KEY"

Copy statuses are review, approved, rejected, allocated (sent to an account) and posted.

GET /api/v1/credits

Balance, credits held by running batches, today's spend and your plan.

curl https://contentflow.gg/api/v1/credits -H "Authorization: Bearer $CONTENTFLOW_KEY"

Errors

Errors come back as {"error":{"code":"…","message":"…"}} with status 400 (bad input), 401 (key missing or revoked), 402 (credits or plan), 403, 404, 409 (source not ready) or 429 (daily cap).

Webhooks

We POST signed JSON to your URL. Failed deliveries are tried again 5 more times over about 9 hours.

Click Add endpoint and enter an https:// address. It has to be a public address.

Pick the events. batch.ready and batch.failed are ticked to start with.

Click Add webhook and copy the signing secret (it starts with whsec_). You can show it again later with Show signing secret in the webhook's menu.

A workspace can have 10 webhook endpoints.

Events

EventSent when
batch.readyAll copies of a batch are made and waiting for review.
batch.failedA batch ended without any usable copies.
copy.approvedSomeone approved a copy.
post.postedA phone marked a post as live, with its link.

Managing a webhook

  • The switch on each webhook pauses it. While it's paused, no events are queued for it.
  • Send test event sends a test event once and shows the answer, for example Test event delivered with the status and time.
  • The menu has Change events, Show signing secret and Remove.

Recent deliveries lists the last 100 events, with the event, endpoint, result (Delivered, Failed, Retrying or Queued), the status your server answered and the number of tries.

Payloads and signatures

Every request has ContentFlow-Event, ContentFlow-Delivery and ContentFlow-Signature: t=…,v1=…. The signature is an HMAC-SHA256 of t + "." + raw body with your signing secret. Answer with any 2xx within 10 seconds. The body looks like this:

{
  "id": "evt_…",
  "type": "batch.ready",
  "created_at": "2026-11-14T09:30:00Z",
  "workspace_id": "…",
  "data": { "id": "…", "name": "Monday drop", "status": "reviewing", "copies_made": 20, … }
}

Check it like this in Node:

import crypto from "node:crypto";

function verify(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const want = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  return fresh && v1?.length === want.length && crypto.timingSafeEqual(Buffer.from(want), Buffer.from(v1));
}

This check also turns away requests signed more than 5 minutes ago.

If a delivery fails, it's tried again after about 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. Redirects aren't followed.

No built-in integrations

ContentFlow connects to other tools through the API and webhooks. Any tool that can send an HTTP request or receive a webhook works.

On this page