Skip to Content
API ReferenceOverview

API Reference

The ChatBlocks API lets you create, read, update, and delete pages programmatically.

Base URL

https://chatblocks.app/api

Authentication

Most endpoints require authentication via either:

  1. API KeyAuthorization: Bearer cb_live_YOUR_KEY
  2. Browser Session — Automatic cookie-based auth from the browser

See Authentication for details.

Request format

All request bodies use JSON. Set Content-Type: application/json.

Error format

Errors return a JSON object with an error field and appropriate HTTP status:

{ "error": "Invalid page spec", "details": { "slug": "Must be at least 2 characters" } }

Status codes

CodeMeaning
200Success
202Accepted (async job queued)
400Bad request / validation error
401Not authenticated
404Not found or not owned
409Idempotency conflict
429Rate limit exceeded (AI generation)
410Deprecated/removed endpoint
503Temporary backend failure
500Internal server error

Rate limits

AI generation (prompt mode) is tiered by auth method:

  • API key auth: default 60/hour
  • Session auth: default 10/hour

Endpoints

MethodPathDescription
POST/api/page-jobsSubmit page creation job
GET/api/page-jobsList page jobs
GET/api/page-jobs/:idGet a page job
POST/api/page-jobs/bulkSubmit bulk page jobs
GET/api/page-jobs/:id/childrenList child jobs for a batch
POST/api/pagesDeprecated create endpoint
GET/api/pagesList all pages
GET/api/pages/:idGet a page
PATCH/api/pages/:idUpdate a page
DELETE/api/pages/:idDelete a page
POST/api/pages/:id/defaultSet default page
POST/api/pages/bulkDeprecated bulk create endpoint
GET/api/qr/:username/:slugGenerate QR code
GET/api/schemaGet JSON Schema
Last updated on