Docs / API

REST API

Everything the app does is drivable over HTTPS from /api/v1. Create keys under API keys in the app; keys are shown once, can be rotated anytime (rotation revokes the old key atomically), and are stored hashed. Limit: 120 requests/minute per key. GET /api/v1 returns a machine-readable index of every endpoint.

Authentication

curl https://app.contentcron.com/api/v1/projects \
  -H "Authorization: Bearer cc_your_key_here"

Projects

GET /api/v1/projects

List projects.

POST /api/v1/projects

Create one — { name, websiteUrl, blogUrl?, sitemapUrl? }. The brand crawl starts immediately.

GET /api/v1/projects/:id

Project with its brand profile.

PATCH /api/v1/projects/:id

Update name, pause/resume, or settings (model, cadence, covers).

POST /api/v1/projects/:id/crawl

Re-learn voice, facts, and cover palette from the site.

Brand

GET /api/v1/projects/:id/brand

The full brand profile.

PUT /api/v1/projects/:id/brand

Update any part — { voice?, companyFacts?, doDont?, voiceTraits?, coverStyle? }.

Topics

GET /api/v1/projects/:id/topics?status=

List, optionally filtered.

POST /api/v1/projects/:id/topics

Add a topic — { title, keyword?, brief?, scheduledFor? }. API-created topics land approved.

POST /api/v1/projects/:id/topics/suggest

Kick an AI topic-research run (async).

PATCH /api/v1/topics/:id

Approve, reject, schedule, or reprioritize.

POST /api/v1/topics/:id/write

Start generation now; returns the new article.

Articles

GET /api/v1/projects/:id/articles?status=

List with status, PR info, and search metrics (when Search Console is connected).

GET /api/v1/articles/:id

Full article including MDX content and frontmatter.

POST /api/v1/articles/:id/revise

Queue an AI revision — { instruction } — same path PR comments use (async).

POST /api/v1/articles/:id/approve

Publish a draft (PR or direct push per project).

POST /api/v1/articles/:id/refresh

Open a refresh PR for a published article.

A full loop

# provision, wait for brand.crawled (webhooks), then:
curl -X POST $BASE/api/v1/projects/$P/topics/suggest -H "$AUTH"

# approve the best suggestion and write it now
curl -X PATCH $BASE/api/v1/topics/$T -H "$AUTH" \
  -H "content-type: application/json" -d '{"status":"approved"}'
curl -X POST $BASE/api/v1/topics/$T/write -H "$AUTH"

# the article arrives as a PR; revise from a script if you like
curl -X POST $BASE/api/v1/articles/$A/revise -H "$AUTH" \
  -H "content-type: application/json" \
  -d '{"instruction":"tighten the intro, add a pricing table"}'

Errors are JSON ({ error: { code, message } }) with conventional status codes; 429 carries Retry-After, and 402 means a plan limit was hit (article quota, project cap, or a feature the plan doesn’t include) — the message says which.