REST API reference
Every documented endpoint, grouped by resource. Each entry below is rendered directly from the same source that generates the machine-readable version — nothing here is typed twice.
Prefer a machine-readable format? GET /api/public/openapi.json is the OpenAPI 3.1 document generated from this same reference. See Authentication & permissions for how to get a token.
Public read
GET/api/public/postsList published posts
Every published, non-future-dated post across the organization, newest first. This is what the website's blog index calls. The response is an explicit allowlist of public-safe fields, not the raw row: `seo_title`, `canonical_url`, `og_image`(_alt), `noindex`, `content_updated_at`, `answer_summary` and `redirect_to` are new (G#31); the last three are omitted entirely, never sent as `null`, when unset. `author` is an entity (`{name, slug, job_title, bio, avatar_url, same_as}`) rather than just the `author_name` string — `null` until the credited person has set a public author_slug. Pass `?platform=<site slug>` to also get a resolved `seo` block (G#33) — `{title, description, canonical, robots, og, twitter, json_ld}` — computed once for this site rather than left for each consumer to build; every field is per-site (canonical URL, publisher identity, sameAs) so it is only sent when the platform names a registered Site. `json_ld` is an array of independent nodes (each carries its own `@context`): BlogPosting (Person author when the post has a byline, Organization publisher from the site/org), a two-level BreadcrumbList (site, post — no guessed category rung), and an FAQPage node only when the body has a visible FAQ section.
Query parameters
| Name | Type | Description |
|---|---|---|
| type | string | Filter to one content type (e.g. `blog`). |
| category_id | string | Filter to one category id. |
| platform | string | Filter to posts targeting this site slug (`Post.platforms`). Omit to get every published post regardless of distribution target. |
| author_slug | string | Filter to posts by one author's public `author_slug` (see `author.slug` in the response). An unrecognized slug returns an empty page, not an error — same contract as every other filter here. |
| page | integer | 1-indexed page number. Default 1. |
| per_page | integer | Page size, capped at 100. Default 50. |
Responses
- 200A page of published posts, each including its category.
Examples
List posts targeting product-manager
curl "https://cms.interactor.com/api/public/posts?platform=product-manager"{
"data": [
{
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"title": "Announcing the API Docs Foundation",
"slug": "announcing-the-api-docs-foundation",
"content": "# Hello\n\nThis is a **published** post used to generate real API examples.",
"content_html": "<h1>Hello</h1>\n<p>This is a <strong>published</strong> post used to generate real API examples.</p>",
"excerpt": "A short excerpt for the fixture post.",
"status": "published",
"type": "blog",
"author_name": "API Docs Admin",
"published_at": "2026-09-12T22:05:52.672Z",
"reading_time": 1,
"tags": [
"announcement",
"docs"
],
"platforms": [
"website",
"product-manager"
],
"category": {
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates"
}
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 50
}
}GET/api/public/posts/slug/{slug}Get one published post by slug
A slug that matches no live post but WAS a post's slug before it was renamed (G#31) answers `{data: {redirect_slug}}` instead of 404 — look up `PostSlugHistory` says this content moved, not that it's gone. `redirect_slug` is the new current slug on this same site; only names a redirect target when the successor post is still published and (if `?platform=` was passed) still targets that site. Distinct from a post's own free-text `redirect_to` field, which is an author's manual override, not a derived rename record. A `.md` suffix on the slug (G#34) — e.g. `.../slug/my-post.md` — returns clean Markdown + YAML frontmatter (`text/markdown`) built from this SAME public allowlist instead of JSON; an HTML-format post's body is converted from its sanitized render, not served as raw pasted HTML.
Path parameters
| Name | Type | Description |
|---|---|---|
| slug* | string | The post's slug, or a slug it used to have. |
Query parameters
| Name | Type | Description |
|---|---|---|
| platform | string | 404 the post if it does not target this site slug. |
Responses
- 200The post, including its category and author; or `{redirect_slug}` for a retired slug.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a post by slug
curl "https://cms.interactor.com/api/public/posts/slug/announcing-the-api-docs-foundation"{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"title": "Announcing the API Docs Foundation",
"slug": "announcing-the-api-docs-foundation",
"status": "published",
"category": {
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates"
}
}
}A retired slug redirects to its successor
curl "https://cms.interactor.com/api/public/posts/slug/announcing-the-old-name"{
"data": {
"redirect_slug": "announcing-the-api-docs-foundation"
}
}Fetch a post as clean Markdown + frontmatter
curl "https://cms.interactor.com/api/public/posts/slug/announcing-the-api-docs-foundation.md"A text/markdown document (YAML frontmatter + body), not JSON.
GET/api/public/posts/{slug}/commentsList a post's published comments
Published comments only, oldest first — pending/spam/rejected comments never appear here.
Path parameters
| Name | Type | Description |
|---|---|---|
| slug* | string | The post's slug. |
Responses
- 200The post's published comments.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
List comments on a post with none yet
curl "https://cms.interactor.com/api/public/posts/announcing-the-api-docs-foundation/comments"{
"data": []
}POST/api/public/posts/{slug}/commentsSubmit a comment on a post
Every new comment lands as `pending` — nothing is auto-published. The consuming website's own spam guard runs before this is ever called; this endpoint only does basic field validation.
Path parameters
| Name | Type | Description |
|---|---|---|
| slug* | string | Must be a published post's slug. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"author_name": {
"type": "string"
},
"author_email": {
"type": "string",
"format": "email"
},
"content": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"author_name",
"author_email",
"content"
]
}Responses
- 201Comment accepted, pending moderation.
- 400Missing field, invalid email, or content over 2000 characters.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Submit a comment
curl -X POST "https://cms.interactor.com/api/public/posts/announcing-the-api-docs-foundation/comments" \
-H "Content-Type: application/json" \
-d '{"author_name":"A Reader","author_email":"reader2@example.com","content":"Nice writeup!"}'{
"data": {
"id": "cmtyyfbo10000trf60uk1iiy4",
"status": "pending"
}
}GET/api/public/faqList published, public FAQ entries
Filters through `PUBLIC_FAQ_WHERE` (src/lib/faq.ts) — the one place that defines "public" for this API. A `sales-only` or unpublished entry never appears here. `{{facts.<key>}}` tokens in `answer` are substituted at read time.
Query parameters
| Name | Type | Description |
|---|---|---|
| category | string | One of: pricing, self-hosting, security, hosted-fleet, ci, billing. |
Responses
- 200Matching FAQ entries.
- 400Unknown `category` value.
Examples
List public FAQs in a category
curl "https://cms.interactor.com/api/public/faq?category=self-hosting"{
"data": [
{
"id": "what-is-the-api-docs-foundation",
"question": "What is the API docs foundation?",
"answer": "It is the typed spec + OpenAPI document + drift test described in CLAUDE.md.",
"answer_error": null,
"category": "self-hosting",
"last_verified": null,
"verify_every_days": 365,
"sources": [],
"related": [],
"asked_count": 0
}
]
}GET/api/public/faq/{id}Get one FAQ entry by slug
`{id}` is the FAQ's human-readable `slug` (e.g. `self-hosting-cloud-cost`), not its database id. A sales-only or unpublished entry 404s here exactly as if it didn't exist — there is no authenticated path through this route that would leak it.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The FAQ's slug. |
Responses
- 200The FAQ entry.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a public FAQ by slug
curl "https://cms.interactor.com/api/public/faq/what-is-the-api-docs-foundation"{
"data": {
"id": "what-is-the-api-docs-foundation",
"question": "What is the API docs foundation?",
"answer": "It is the typed spec + OpenAPI document + drift test described in CLAUDE.md.",
"category": "self-hosting"
}
}Unknown slug
curl "https://cms.interactor.com/api/public/faq/does-not-exist"{
"error": "Not found"
}GET/api/public/rss.xmlRSS feed of a site's published posts
Unlike `/api/public/posts`, `platform` is required here — a feed needs exactly one site's `url` (registered from Settings → Sites) to build each `<link>` from, and there is no "all sites" feed to fall back to. 404s if no `Site` row is registered for that slug.
Query parameters
| Name | Type | Description |
|---|---|---|
| platform* | string | The registered site slug to build the feed for. |
Responses
- 200`application/rss+xml` body.
- 400`?platform=` was omitted.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a site's RSS feed
curl "https://cms.interactor.com/api/public/rss.xml?platform=product-manager"An application/rss+xml document, not JSON.
GET/api/public/sitemap.xmlSitemap of a site's published posts
Same `?platform=` contract as `/api/public/rss.xml` (required, 404s for an unregistered slug) — a plain XML sitemap of the site's published post URLs. No item cap (G#34): every published post is included. `<lastmod>` is `content_updated_at` (falling back to `updated_at`), never `published_at` — a pure tag/status edit does not bump it. Excludes `noindex` posts and posts whose `canonical_url` points at a different site (a syndicated copy, not this site's canonical source).
Query parameters
| Name | Type | Description |
|---|---|---|
| platform* | string | The registered site slug to build the sitemap for. |
Responses
- 200`application/xml` body.
- 400`?platform=` was omitted.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a site's sitemap
curl "https://cms.interactor.com/api/public/sitemap.xml?platform=product-manager"An application/xml document, not JSON.
GET/api/public/llms.txtllms.txt index of a site's published posts
Same `?platform=` contract as `/api/public/rss.xml` (required, 404s for an unregistered slug) — a plain-text `llms.txt` (llmstxt.org convention) listing every published post as a Markdown link with a one-line description. A by-product, per SEO-AEO-GEO-PLAN.md's own framing: near-zero cost, no claim that any crawler treats it specially.
Query parameters
| Name | Type | Description |
|---|---|---|
| platform* | string | The registered site slug to build the index for. |
Responses
- 200`text/plain` body.
- 400`?platform=` was omitted.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a site's llms.txt
curl "https://cms.interactor.com/api/public/llms.txt?platform=product-manager"A text/plain document, not JSON.
GET/api/public/indexnow-keyA site's IndexNow verification key
IndexNow (bing.com/indexnow) requires the CONSUMING site to host this exact string at `${site.url}/<key>.txt` before a ping naming that key is trusted — the CMS cannot host that file itself (it lives on the site's own domain), so this is the one door the key comes out of. Generates and persists a key on first read for a site that has never had one (a self-hosted deployment upgrading onto this column needs no manual step).
Query parameters
| Name | Type | Description |
|---|---|---|
| platform* | string | The registered site slug to fetch the key for. |
Responses
- 200`{data: {key}}`.
- 400`?platform=` was omitted.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a site's IndexNow key
curl "https://cms.interactor.com/api/public/indexnow-key?platform=product-manager"{
"data": {
"key": "3a1f9c2b8e4d4a5f9b1c7e2d6a0f8b3c"
}
}GET/api/public/categoriesList categories with published-post counts
Responses
- 200Every category in the organization, with `post_count`.
Examples
List categories
curl "https://cms.interactor.com/api/public/categories"{
"data": [
{
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates",
"description": "Release notes and product news",
"color": null,
"sort_order": 0,
"post_count": 1
}
]
}GET/api/public/healthHealth check
Pings the database. Used by Caddy's active upstream monitoring.
Responses
- 200Database reachable.
- 503Database unreachable.
Examples
Health check
curl "https://cms.interactor.com/api/public/health"{
"status": "ok"
}GET/api/public/openapi.jsonThis OpenAPI 3.1 document
Generated from this spec file at request time. Unauthenticated, CORS-enabled.
Responses
- 200The OpenAPI 3.1 document.
Examples
Fetch the OpenAPI document
curl "https://cms.interactor.com/api/public/openapi.json"The full generated OpenAPI 3.1 document (this document itself).
Forms
POST/api/contactsSubmit an FAQ question
Public for POST only (`PUBLIC_FORM_POSTS` in src/proxy.ts). Accepts only `type: "question"`, which feeds the FAQ intake; contact, demo, support and partner inquiries, newsletter sign-ups and the waitlist moved to Interactor CRM (crm.interactor.com) and get 410 here. Every submission is pinned to the Interactor organization regardless of which site it came from.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"company": {
"type": "string"
},
"jobTitle": {
"type": "string"
},
"phone": {
"type": "string"
},
"productInterest": {
"type": "string"
},
"country": {
"type": "string"
},
"subject": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"question"
]
},
"source": {
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"email",
"message",
"type"
]
}Responses
- 201Submission stored.
- 400Missing required field(s) or an invalid email.
- 410Any type other than "question": those inquiries go to Interactor CRM.
- 500Internal error.
Examples
Submit a question
curl -X POST "https://cms.interactor.com/api/contacts" -H "Content-Type: application/json" \
-d '{"firstName":"Jane","lastName":"Doe","email":"jane.doe@example.com","message":"Does the CMS support scheduled posts?","type":"question"}'{
"success": true,
"id": "cmtyyfgeq0001trf6mvcbqkm8"
}Posts
GET/api/cms/postsList posts
`?status=published` is readable by any signed-in caller; any other filter (or no filter) requires `content:view`. A site-scoped token's results are additionally filtered to posts targeting its sites.
Query parameters
| Name | Type | Description |
|---|---|---|
| status | string | e.g. `draft`, `published`. |
| type | string | Filter by content type. |
| category_id | string | Filter by category. |
| site | string | A site slug: only posts targeting that site (`Post.platforms` contains it). |
| search | string | Case-insensitive text matched against title, slug, excerpt and body (first 200 characters used). |
| workflow_status | string | `draft` | `pending_review` | `approved` | `rejected`. |
| published | string | `true` is shorthand for `status=published`. |
| page | integer | Default 1. |
| per_page | integer | Default 50, capped at 100. |
Responses
- 200A page of posts.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
List draft posts
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts?status=draft"{
"data": [
{
"id": "cmtyxp8le000ayof6g5jnv6l4",
"title": "Draft: Upcoming Feature",
"slug": "draft-upcoming-feature",
"status": "draft",
"workflow_status": "draft",
"platforms": [
"website"
]
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 50
}
}No credential
curl "https://cms.interactor.com/api/cms/posts"{
"error": "Unauthorized"
}POST/api/cms/postsCreate a post
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified title."
},
"content": {
"type": "string"
},
"content_format": {
"type": "string",
"enum": [
"markdown",
"html"
],
"default": "markdown"
},
"excerpt": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"published"
],
"description": "Publishing requires `content:publish`; otherwise the post is saved as a draft even if `published` is requested."
},
"type": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"featured_image": {
"type": "string"
},
"featured_image_alt": {
"type": "string"
},
"meta_description": {
"type": "string"
},
"meta_keywords": {
"type": "string"
},
"seo_title": {
"type": "string",
"description": "Overrides `title` in <title>/og:title/twitter:title. Blank clears it."
},
"canonical_url": {
"type": "string",
"description": "Set only for a syndicated copy of a post published elsewhere first."
},
"og_image": {
"type": "string",
"description": "Overrides `featured_image` for Open Graph/Twitter cards."
},
"og_image_alt": {
"type": "string"
},
"noindex": {
"type": "boolean",
"default": false
},
"answer_summary": {
"type": "string",
"description": "A 40-60 word self-contained answer to the post's question — the TL;DR/AI-answer-engine source."
},
"redirect_to": {
"type": "string",
"description": "This slug has been superseded: a path or absolute URL a consuming site should permanently redirect readers to."
},
"mark_updated": {
"type": "boolean",
"description": "Force `content_updated_at` to now even though title/content/content_format/excerpt didn't change."
},
"category_id": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"platforms": {
"type": "array",
"items": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"description": "Distribution targets. Defaults to `[\"website\"]` when omitted; an empty/all-invalid list is rejected rather than creating an undistributed post."
},
"author_id": {
"type": "string",
"description": "Reassigning authorship away from the caller requires `content:edit_any`."
}
}
}Responses
- 201Post created. Carries a `warning` field instead of erroring if `status: "published"` was requested without `content:publish` — the post is saved as a draft.
- 400`platforms` resolved to no valid site.
- 403Site-scope refusal (create must target only in-scope sites), or `content:edit_any` needed to set `author_id`.
- 409A post with this slug already exists.
Examples
Create a draft post
curl -X POST "https://cms.interactor.com/api/cms/posts" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"title":"A Throwaway Post For Docs","content":"Body text.","status":"draft","tags":["temp-doc-tag"]}'{
"data": {
"id": "cmtyyfho30004trf6hbnax6dy",
"title": "A Throwaway Post For Docs",
"slug": "a-throwaway-post-for-docs",
"content": "Body text.",
"status": "draft",
"tags": [
"temp-doc-tag"
],
"platforms": [
"website"
]
}
}GET/api/cms/posts/{id}Get one post
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200The post.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "read" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Fetch a post
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi"{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"title": "Announcing the API Docs Foundation",
"slug": "announcing-the-api-docs-foundation",
"status": "published",
"category": {
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates"
},
"preview_url": null
}
}Unknown id
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/does-not-exist"{
"error": "Not found"
}PUT/api/cms/posts/{id}Replace a post's editable fields
Every field is optional — omitted fields are left unchanged. Pass `expected_content_hash` (or an `If-Match` header carrying the post's `content_hash`) for optimistic-concurrency protection; a stale value 409s instead of silently overwriting a newer edit. A site-scoped token must have both the post's current sites AND any new `platforms` within its scope.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified title."
},
"content": {
"type": "string"
},
"content_format": {
"type": "string",
"enum": [
"markdown",
"html"
],
"default": "markdown"
},
"excerpt": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"published"
],
"description": "Publishing requires `content:publish`; otherwise the post is saved as a draft even if `published` is requested."
},
"type": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"featured_image": {
"type": "string"
},
"featured_image_alt": {
"type": "string"
},
"meta_description": {
"type": "string"
},
"meta_keywords": {
"type": "string"
},
"seo_title": {
"type": "string",
"description": "Overrides `title` in <title>/og:title/twitter:title. Blank clears it."
},
"canonical_url": {
"type": "string",
"description": "Set only for a syndicated copy of a post published elsewhere first."
},
"og_image": {
"type": "string",
"description": "Overrides `featured_image` for Open Graph/Twitter cards."
},
"og_image_alt": {
"type": "string"
},
"noindex": {
"type": "boolean",
"default": false
},
"answer_summary": {
"type": "string",
"description": "A 40-60 word self-contained answer to the post's question — the TL;DR/AI-answer-engine source."
},
"redirect_to": {
"type": "string",
"description": "This slug has been superseded: a path or absolute URL a consuming site should permanently redirect readers to."
},
"mark_updated": {
"type": "boolean",
"description": "Force `content_updated_at` to now even though title/content/content_format/excerpt didn't change."
},
"category_id": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"platforms": {
"type": "array",
"items": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"description": "Distribution targets. Defaults to `[\"website\"]` when omitted; an empty/all-invalid list is rejected rather than creating an undistributed post."
},
"author_id": {
"type": "string",
"description": "Reassigning authorship away from the caller requires `content:edit_any`."
},
"expected_content_hash": {
"type": [
"string",
"null"
],
"description": "Optimistic-concurrency guard; alternative to the `If-Match` header."
}
}
}Responses
- 200The updated post.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403Not the post's author (needs `content:edit_any`), or a site-scope refusal.
- 409Optimistic-concurrency conflict: `expected_content_hash` (or an `If-Match` header) was sent and no longer matches — someone else wrote this post since the caller loaded it.
{ "error": "This post was edited since you loaded it — re-fetch, re-apply your change, and retry", "current_hash": "a1b2c3...", "updated_at": "2026-09-12T22:26:22.147Z", "last_editor": { "id": "cmtyxp8h50002yof6qpeapon9", "name": "API Docs Admin" } } - 409The new slug collides with another post.
Examples
Update a post's excerpt
curl -X PUT "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"excerpt":"An updated excerpt for the fixture post."}'{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"excerpt": "An updated excerpt for the fixture post.",
"updated_by_name": "API Docs Admin"
}
}Site-scoped token editing an out-of-scope post
curl -X PUT "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4" -H "Authorization: Bearer cms_pat_...(scoped to product-manager)" -H "Content-Type: application/json" \
-d '{"excerpt":"Trying to edit a website-only post with a product-manager-scoped token."}'{
"error": "This token is limited to the site product-manager, and this post also targets website, so the token can't change it. Use a token that covers website too, or make the change in the CMS.",
"token_site_scopes": [
"product-manager"
],
"post_sites": [
"website"
]
}DELETE/api/cms/posts/{id}Delete a post
Moves the post to the trash: it disappears from every listing and the public API at once and its slug is free again, but `GET /api/cms/posts/trash` lists it and `POST /api/cms/posts/trash/{id}/restore` brings it back (as a draft) for 30 days. Comments and revision history are not kept.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 204Moved to the trash.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Delete a post
curl -X DELETE "https://cms.interactor.com/api/cms/posts/cmtyyfho30004trf6hbnax6dy" -H "Authorization: Bearer cms_pat_..."GET/api/cms/posts/trashList deleted posts (the trash)
Posts deleted in the last 30 days, newest first. `id` is the trash entry (pass it to restore), `post_id` the deleted post's own id. Entries older than 30 days are removed for good. A site-scoped token sees only entries for its sites.
Query parameters
| Name | Type | Description |
|---|---|---|
| search | string | Case-insensitive text matched against title and slug. |
Responses
- 200Trash entries and `retention_days`.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
Find a deleted post
curl "https://cms.interactor.com/api/cms/posts/trash?search=trash" -H "Authorization: Bearer cms_pat_..."{
"data": [
{
"id": "cmuex7xim00023rf628awptbi",
"post_id": "cmuex7s3j00003rf6b4h8s5zm",
"title": "Trash test",
"slug": "trash-test",
"status": "draft",
"platforms": [
"website"
],
"deleted_at": "2026-09-24T02:36:44.014Z",
"deleted_by": "dev@example.com",
"expires_at": "2026-10-24T02:36:44.014Z"
}
],
"retention_days": 30
}POST/api/cms/posts/trash/{id}/restoreRestore a deleted post
Recreates the post from the trash, with its old id when that is still free. It always comes back as a DRAFT, so a restore never republishes anything by itself. Its slug gets a `-restored` suffix if another post took it meanwhile, and its social drafts are linked to it again.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The trash entry's id (from the trash list), not the post's. |
Responses
- 201The restored post's id, slug, title and status (`draft`).
- 404Not in the trash: already restored, or removed after 30 days.
- 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Restore a post
curl -X POST "https://cms.interactor.com/api/cms/posts/trash/cmuex7xim00023rf628awptbi/restore" -H "Authorization: Bearer cms_pat_..."{
"data": {
"id": "cmuex7s3j00003rf6b4h8s5zm",
"slug": "trash-test",
"title": "Trash test",
"status": "draft"
}
}GET/api/cms/posts/slug/{slug}Get one post by slug (authenticated)
Like the public slug lookup, but sees drafts too (with `content:view`) and honors an explicit `?status=` filter.
Path parameters
| Name | Type | Description |
|---|---|---|
| slug* | string | The post's slug. |
Query parameters
| Name | Type | Description |
|---|---|---|
| status | string | Restrict the lookup to this status. |
Responses
- 200The post.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "read" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Fetch by slug
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/slug/announcing-the-api-docs-foundation"{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"slug": "announcing-the-api-docs-foundation"
}
}GET/api/cms/posts/exportBulk-export posts as a Markdown vault (.zip)
An Obsidian-ready vault folder (`content/posts/<slug>.md` per post, frontmatter + body). A site-scoped token exports only posts targeting its sites.
Query parameters
| Name | Type | Description |
|---|---|---|
| status | string | Filter by status before exporting. |
Responses
- 200`application/zip` binary body.
Examples
Export all posts
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/export" -o cms-posts-export.zipBinary application/zip body (not shown). Observed headers: Content-Type: application/zip; Content-Disposition: attachment; filename="cms-posts-export.zip".
GET/api/cms/posts/{id}/exportExport one post as a Markdown file
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200`text/markdown` body: frontmatter + content.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "read" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Export one post
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/export"---
id: cmtyxp8kn0009yof6u7xh6cpi
content_hash: 5a2decc4cac0d84a5faed8c6d1ecfdb0adab802af38761fb0cbcd4948040face
title: Announcing the API Docs Foundation
slug: announcing-the-api-docs-foundation
status: published
type: blog
content_format: markdown
excerpt: An updated excerpt for the fixture post.
category: product-updates
tags:
- announcement
- docs
platforms:
- website
- product-manager
published_at: '2026-09-12T22:05:52.672Z'
---
# Hello
This is a **published** post used to generate real API examples.
DELETE/api/cms/posts/bulk-deleteDelete multiple posts at once
The matched posts go to the trash, like a single delete (restorable for 30 days). A site-scoped token's batch is refused WHOLE if any matched post falls outside its scope — never a silent partial delete.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
}
},
"slugs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Provide `ids` or `slugs` (ids take precedence if both are present)."
}Responses
- 204Matched posts deleted (or nothing matched).
- 403Site-scope batch refusal, naming the out-of-scope posts.
Examples
Bulk-delete by id
curl -X DELETE "https://cms.interactor.com/api/cms/posts/bulk-delete" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"ids":["cmtyyfho30004trf6hbnax6dy","cmtyyfu2k0006trf6lt81di50"]}'POST/api/cms/posts/generate-seoHeuristically generate SEO fields from a title/content
Pure text heuristics (word frequency + truncation) — no AI call. Powers the editor's "Generate SEO" button.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
}
},
"description": "At least one of `title`/`content` is required."
}Responses
- 200Suggested meta_description, meta_keywords, excerpt, featured_image_alt.
- 400Both `title` and `content` were empty.
Examples
Generate SEO fields
curl -X POST "https://cms.interactor.com/api/cms/posts/generate-seo" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"title":"Announcing the API Docs Foundation","content":"<p>This is a published post used to generate real API examples for the CMS OpenAPI document.</p>"}'{
"success": true,
"data": {
"meta_description": "This is a published post used to generate real API examples for the CMS OpenAPI document.",
"meta_keywords": "announcing, docs, foundation, published, post, used, generate, real",
"excerpt": "This is a published post used to generate real API examples for the CMS OpenAPI document.",
"featured_image_alt": "Announcing the API Docs Foundation"
}
}POST/api/cms/posts/importImport a Markdown file (frontmatter + body)
The write side of the file-based sync feature. Upserts by the frontmatter's `slug`/`id`; `?force=true` bypasses the optimistic-concurrency conflict check. A site-scoped token may only import into its own sites.
Query parameters
| Name | Type | Description |
|---|---|---|
| force | boolean | Bypass the conflict check. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "The full file content, frontmatter + body."
},
"filename": {
"type": "string"
}
},
"required": [
"raw"
]
}Responses
- 201New post created.
- 200Existing post updated.
- 409Conflict: the base hash in the frontmatter no longer matches (someone edited in the CMS since).
- 400Malformed frontmatter or missing `raw`.
Examples
Import a new post from a Markdown file
curl -X POST "https://cms.interactor.com/api/cms/posts/import" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"raw":"---\ntitle: Imported From File\nstatus: draft\n---\n\nBody content from a Markdown file.\n","filename":"imported-from-file.md"}'{
"data": {
"id": "cmtyyfu2k0006trf6lt81di50",
"title": "Imported From File",
"slug": "imported-from-file",
"status": "draft"
},
"created": true
}POST/api/cms/posts/{id}/workflowAdvance a post through the review workflow
draft → pending_review (`submit`) → `approve`/`reject`, or `publish`/`unpublish` directly for `content:publish` holders. Each action has its own permission and valid preceding state — see the 403/409 responses.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"submit",
"approve",
"reject",
"publish",
"unpublish"
]
},
"comments": {
"type": "string"
},
"reason": {
"type": "string",
"description": "Used by `reject`; falls back to `comments`."
}
},
"required": [
"action"
]
}Responses
- 200The post in its new state. For a token caller, `submit` and `publish` also return `humanizer`: `{ version, reviewed, warnings }`, the passages that read as AI-written (advisory, never a refusal).
- 400Unknown or missing `action`.
- 403Missing the action's permission (`content:approve`/`content:reject`/`content:publish`), or not the post's own author for `submit`.
- 409The post isn't in the state the action requires (e.g. approving a non-pending post).
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Submit a draft for review
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/workflow" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"action":"submit"}'{
"data": {
"id": "cmtyxp8le000ayof6g5jnv6l4",
"workflow_status": "pending_review"
}
}Approve it
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/workflow" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"action":"approve","comments":"Looks good"}'{
"data": {
"id": "cmtyxp8le000ayof6g5jnv6l4",
"workflow_status": "approved",
"approved_by_id": "cmtyxp8h50002yof6qpeapon9"
}
}GET/api/cms/posts/{id}/workflowGet a post's approval history
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200Every `ContentApproval` row for this post, newest first.
Examples
Approval history
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/workflow"{
"data": [
{
"id": "cmtyyfxc70007trf62djl56f5",
"post_id": "cmtyxp8le000ayof6g5jnv6l4",
"action": "approved",
"comments": "Looks good",
"reviewer": {
"id": "cmtyxp8h50002yof6qpeapon9",
"name": "API Docs Admin",
"email": "apidocs-admin@example.com"
}
}
]
}POST/api/cms/posts/{id}/resolve-conflictResolve a file-sync conflict by keeping the CMS version
Clears `sync_conflict` and `last_synced_hash` so the next outbound sync sweep re-pushes the CMS's current content, overwriting the git side.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"expected_content_hash": {
"type": [
"string",
"null"
]
}
}
}Responses
- 200The post with `sync_conflict: false`.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Optimistic-concurrency conflict: `expected_content_hash` (or an `If-Match` header) was sent and no longer matches — someone else wrote this post since the caller loaded it.
{ "error": "This post was edited since you loaded it — re-fetch, re-apply your change, and retry", "current_hash": "a1b2c3...", "updated_at": "2026-09-12T22:26:22.147Z", "last_editor": { "id": "cmtyxp8h50002yof6qpeapon9", "name": "API Docs Admin" } } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Keep the CMS version
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/resolve-conflict" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{}'{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"sync_conflict": false,
"last_synced_hash": null
}
}POST/api/cms/posts/{id}/revisionsSave a labelled checkpoint of a post
Snapshots the post as it is now under a label ("Before rewriting the intro"), so a big change is one restore away. Labelled checkpoints are exempt from age-based thinning. If the newest revision already holds exactly this state it is labelled and returned (200) rather than duplicated.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"label": {
"type": "string",
"maxLength": 200
}
},
"required": [
"label"
]
}Responses
- 201The new checkpoint's metadata.
- 200The newest revision already matched; it now carries the label.
- 400Missing label, or longer than 200 characters.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403Not the post's own author (needs `content:edit_any`), or a site-scope refusal.
Examples
Checkpoint before a rewrite
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/revisions" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"label":"Before rewriting the intro"}'{
"data": {
"id": "cmu0rev0000000000000000001",
"title": "Hello world",
"source": "checkpoint",
"label": "Before rewriting the intro",
"edited_by": {
"id": "cmu0usr0000000000000000001",
"name": "Ada Writer",
"email": "ada@example.com"
},
"inserted_at": "2026-09-23T18:00:00.000Z"
}
}GET/api/cms/posts/{id}/revisionsList a post's revision history (metadata only)
Paginated, newest first; no `content`/`content_html` bodies — fetch a single revision for the full snapshot.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Query parameters
| Name | Type | Description |
|---|---|---|
| page | integer | Default 1. |
| per_page | integer | Default 50, capped at 100. |
Responses
- 200A page of revision metadata.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "read" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
List revisions
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/revisions"{
"data": [
{
"id": "cmtyyfl8q0005trf6ddbdv84p",
"title": "Announcing the API Docs Foundation",
"source": "api",
"edited_by": {
"id": "cmtyxp8h50002yof6qpeapon9",
"name": "API Docs Admin",
"email": "apidocs-admin@example.com"
},
"inserted_at": "2026-09-12T22:26:22.154Z"
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 50
}
}GET/api/cms/posts/{id}/revisions/{revisionId}Get one revision's full snapshot
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
| revisionId* | string | The revision's id. |
Responses
- 200The full revision, including content and content_html.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch one revision
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/revisions/cmtyyfl8q0005trf6ddbdv84p"{
"data": {
"id": "cmtyyfl8q0005trf6ddbdv84p",
"post_id": "cmtyxp8kn0009yof6u7xh6cpi",
"title": "Announcing the API Docs Foundation",
"content": "# Hello\n\nThis is a **published** post used to generate real API examples.",
"source": "api",
"edited_by": {
"id": "cmtyxp8h50002yof6qpeapon9",
"name": "API Docs Admin",
"email": "apidocs-admin@example.com"
}
}
}POST/api/cms/posts/{id}/revisions/{revisionId}/restoreRestore a post to an earlier revision
The post's CURRENT state is snapshotted first (`source: "restore"`), so a restore is itself always undoable.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
| revisionId* | string | The revision to restore. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"expected_content_hash": {
"type": [
"string",
"null"
]
}
}
}Responses
- 200The restored post.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Optimistic-concurrency conflict: `expected_content_hash` (or an `If-Match` header) was sent and no longer matches — someone else wrote this post since the caller loaded it.
{ "error": "This post was edited since you loaded it — re-fetch, re-apply your change, and retry", "current_hash": "a1b2c3...", "updated_at": "2026-09-12T22:26:22.147Z", "last_editor": { "id": "cmtyxp8h50002yof6qpeapon9", "name": "API Docs Admin" } } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Restore a revision
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/revisions/cmtyyfl8q0005trf6ddbdv84p/restore" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{}'{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"title": "Announcing the API Docs Foundation",
"content": "# Hello\n\nThis is a **published** post used to generate real API examples.",
"excerpt": "A short excerpt for the fixture post."
}
}POST/api/cms/posts/{id}/preview-linkMint (or refresh) a signed preview link
Gated the same as editing the post — minting a link hands out read access to unpublished content. The link expires in 7 days and replacing it invalidates any previously issued token for this post.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200The signed preview URL and its expiry.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403Not the post's own author (needs `content:edit_any`), or a site-scope refusal.
Examples
Mint a preview link
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/preview-link" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{}'{
"data": {
"url": "https://cms.interactor.com/preview/Y210eXhwOGxlMDAwYXlvZjZnNWpudjZsNC4xNzg5ODU2ODI0NjYwLmdoY2VwQVg5b2pIbHU0S1NLVUJwRGJaeUNQckdHZUhrUktleEJWeDRfYUU",
"expires_at": "2026-09-19T22:27:04.660Z"
}
}GET/api/cms/posts/{id}/seo-checkSearch & AI readiness check (G#32)
The same check the publish/approve workflow actions gate on (src/lib/seo-readiness.ts): `errors` (meta description length, effective title length, slug format, no `<h1>` in body, image alt text, answer_summary length, heading-level skips) block that transition; `warnings` (question-phrased H2s, internal/outbound links, a cited statistic, a definitional opening sentence, a duplicate title elsewhere in the org, title/meta near-duplication) are advisory only. Read-only, and an existing published post is never retro-blocked by calling this — only the workflow gate refuses a transition. Warnings whose key starts with `humanizer_` are passages that read as AI-written (src/lib/humanizer): text rules always, plus a model review against the Humanizer rules (`humanizer_review`) when an AI key is configured. `humanizer.reviewed` says whether that review ran; `?humanizer_review=false` skips it.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200The readiness result.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Check a post's readiness
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/seo-check"{
"data": {
"errors": [
{
"key": "answer_summary_length",
"message": "Answer summary should be 25-80 words (currently 0)."
}
],
"warnings": [
{
"key": "no_statistic",
"message": "No statistic or number with context found — cited data raises AI-answer visibility."
}
]
}
}POST/api/cms/writer-listOpen the writer's post list (Interactor CMS plugin)
Backs the `open_post_list` MCP tool. Returns `list_url`: the writer's post list page with a short-lived browse key in its URL fragment, for Claude to open in the app's browser panel, where clicking a post opens it in the editor. The key lists this organization's posts (narrowed to `site` and the token's site scope) and opens them, nothing else; it expires in 8 hours, ends when the minting token is revoked, and replaces the caller's previous list key.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"site": {
"type": "string"
},
"search": {
"type": "string",
"maxLength": 200
}
}
}Responses
- 200`list_url`, the site it shows, and the key's expiry.
- 400Unknown site.
- 403The site is outside the token's site scope.
Examples
Open the post list for one site
curl -X POST "https://cms.interactor.com/api/cms/writer-list" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"site":"website"}'{
"data": {
"list_url": "https://cms.interactor.com/write/posts#key=cms_list_...",
"site": "website",
"expires_at": "2026-09-24T08:00:00.000Z"
}
}POST/api/cms/writer-mirrorStart the local posts folder mirror (Interactor CMS plugin)
Backs the `open_mirror` MCP tool. Returns a mirror key for the plugin's local posts folder: it lists this workspace's posts (the workspace's site, or `site`, within the token's site scope) and reads and saves their Markdown files through the plugin's private `/api/edit/mirror/*` protocol, under the same checks as editing the post. It never creates or deletes a post or changes its status. It expires in 8 hours, ends when the minting token is revoked, and replaces the caller's previous mirror key for the same site.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"site": {
"type": "string"
}
}
}Responses
- 200The workspace, `mirror_key`, `mirror_url`, the site and the key's expiry.
- 400Unknown site.
- 403The site is outside the token's site scope.
Examples
Start the mirror for one site
curl -X POST "https://cms.interactor.com/api/cms/writer-mirror" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"site":"website"}'{
"data": {
"workspace": "writer@example.com/acme/website",
"mirror_key": "cms_mirror_...",
"mirror_url": "https://cms.interactor.com/api/edit/mirror",
"site": "website",
"can_edit": true,
"expires_at": "2026-11-24T08:00:00.000Z"
}
}POST/api/cms/posts/{id}/edit-sessionOpen a post for live editing (Interactor CMS plugin)
Backs the `open_for_editing` MCP tool. Returns the post's live preview link (reusing an active one), a one-post edit key for the plugin's local sync tool, and `editor_url`, the writer editor (the post formatted and typed on directly) with the key in its URL fragment. The key authenticates only `/api/edit/*`, only for this post, expires in 8 hours, ends when the minting token is revoked, and replaces any key the caller already held for the post. `editor_url` also carries a post-list key (`&list=`) for the editor's "All posts" link; an optional JSON body `{ "site": "<slug>" }` narrows that list to one site.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 200Preview URL, edit key and its expiry, and the sync file URL.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403Not the post's own author (needs `content:edit_any`), or a site-scope refusal.
Examples
Open a post for editing
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/edit-session" -H "Authorization: Bearer cms_pat_..."{
"data": {
"post": {
"id": "cmtyxp8le000ayof6g5jnv6l4",
"slug": "hello-world",
"title": "Hello world"
},
"filename": "hello-world.md",
"preview_url": "https://cms.interactor.com/preview/Y210eXhwOGxl...",
"edit_key": "cms_edit_...",
"edit_key_expires_at": "2026-09-24T02:00:00.000Z",
"file_url": "https://cms.interactor.com/api/edit/file",
"editor_url": "https://cms.interactor.com/write#key=cms_edit_...&list=cms_list_..."
}
}POST/api/cms/posts/{id}/featured-imageGenerate a title-card featured image
Renders a 1200×630 title card (post title, category, organization, author) on the CMS server — no image model, no third-party service, no cost — stores it in the media library, and sets it as the post's `featured_image`. Replaces an existing featured image; sets `featured_image_alt` only when it is empty. Publishing a post that has no featured image does this automatically, so call this only to preview or refresh the card.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 201The post's new `featured_image`/`featured_image_alt` and the created media id.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 403Not the post's own author (needs `content:edit_any`), or a site-scope refusal.
- 502Rendering or storage failed; the post is unchanged.
Examples
Generate a featured image
curl -X POST "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/featured-image" -H "Authorization: Bearer cms_pat_..."{
"data": {
"id": "cmtyxp8le000ayof6g5jnv6l4",
"featured_image": "https://interactor-media.s3.amazonaws.com/uploads/1790802834704-hello-world-featured.png",
"featured_image_alt": "Title card reading \"Hello, world\"",
"media_id": "cmuelojym0009wrs6abcd1234"
}
}DELETE/api/cms/posts/{id}/preview-linkRevoke a post's active preview link
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Responses
- 204Revoked (or there was none).
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Revoke a preview link
curl -X DELETE "https://cms.interactor.com/api/cms/posts/cmtyxp8le000ayof6g5jnv6l4/preview-link" -H "Authorization: Bearer cms_pat_..."PATCH/api/cms/posts/{id}/contentAnchored find/replace edit of a post's content
A token-cheaper alternative to PUT for a small, localized change. Every `find` anchor must match `expected_occurrences` times (default 1, applied in order — a later anchor may target text an earlier replacement just introduced); a zero-match or ambiguous anchor refuses the WHOLE call with a 400 naming which replacement failed and how many matches it found, before anything is written.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The post's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"replacements": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"find": {
"type": "string",
"minLength": 1
},
"replace": {
"type": "string"
},
"expected_occurrences": {
"type": "integer",
"minimum": 1,
"default": 1
}
},
"required": [
"find",
"replace"
]
}
},
"expected_content_hash": {
"type": [
"string",
"null"
]
}
},
"required": [
"replacements"
]
}Responses
- 200The post with the replacements applied (or unchanged, if the replacements were a no-op).
- 400A replacement's anchor matched the wrong number of times; names which one and how many matches were found.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Optimistic-concurrency conflict: `expected_content_hash` (or an `If-Match` header) was sent and no longer matches — someone else wrote this post since the caller loaded it.
{ "error": "This post was edited since you loaded it — re-fetch, re-apply your change, and retry", "current_hash": "a1b2c3...", "updated_at": "2026-09-12T22:26:22.147Z", "last_editor": { "id": "cmtyxp8h50002yof6qpeapon9", "name": "API Docs Admin" } } - 403The caller's token is site-scoped (see `token.site_scopes` on `GET /api/me`) and this post falls outside it for a "change" request. Never a 404 — the post is not a secret from the token's organization.
{ "type": "object", "properties": { "error": { "type": "string" }, "token_site_scopes": { "type": "array", "items": { "type": "string" } }, "post_sites": { "type": "array", "items": { "type": "string" } } }, "required": [ "error", "token_site_scopes", "post_sites" ] }
Examples
Apply an anchored replacement
curl -X PATCH "https://cms.interactor.com/api/cms/posts/cmtyxp8kn0009yof6u7xh6cpi/content" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"replacements":[{"find":"Hello","replace":"Hello there"}]}'{
"data": {
"id": "cmtyxp8kn0009yof6u7xh6cpi",
"content": "# Hello there\n\nThis is a **published** post used to generate real API examples."
}
}Ambiguous anchor (3 matches, expected 1)
curl -X PATCH "https://cms.interactor.com/api/cms/posts/cmtyyviqt0002x0f62wmsfezm/content" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"replacements":[{"find":"cat","replace":"dog"}]}'{
"error": "Replacement 0 found 3 match(es) for its anchor, expected 1 — no changes were applied",
"index": 0,
"find": "cat",
"expected_occurrences": 1,
"found_occurrences": 3
}Categories
GET/api/cms/categoriesList categories
Responses
- 200Every category, sorted by sort_order then name.
Examples
List categories
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/categories"{
"data": [
{
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates",
"description": "Release notes and product news"
}
]
}POST/api/cms/categoriesCreate a category
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified name."
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"sort_order": {
"type": "integer",
"default": 0
}
},
"required": [
"name"
]
}Responses
- 201The created category.
- 409A category with this name or slug already exists.
Examples
Create a category
curl -X POST "https://cms.interactor.com/api/cms/categories" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"name":"Throwaway Category"}'{
"data": {
"id": "cmtyyglwl000atrf6g12cxn2y",
"name": "Throwaway Category",
"slug": "throwaway-category"
}
}GET/api/cms/categories/{id}Get one category
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The category's id. |
Responses
- 200The category.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a category
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/categories/cmtyxp8il0006yof66fgkf2b5"{
"data": {
"id": "cmtyxp8il0006yof66fgkf2b5",
"name": "Product Updates",
"slug": "product-updates"
}
}PUT/api/cms/categories/{id}Update a category
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The category's id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified name."
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"sort_order": {
"type": "integer",
"default": 0
}
}
}Responses
- 200The updated category.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Name/slug collision.
Examples
Update a category's description
curl -X PUT "https://cms.interactor.com/api/cms/categories/cmtyyglwl000atrf6g12cxn2y" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"description":"Updated description"}'{
"data": {
"id": "cmtyyglwl000atrf6g12cxn2y",
"description": "Updated description"
}
}DELETE/api/cms/categories/{id}Delete a category
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The category's id. |
Responses
- 204Deleted.
Examples
Delete a category
curl -X DELETE "https://cms.interactor.com/api/cms/categories/cmtyyglwl000atrf6g12cxn2y" -H "Authorization: Bearer cms_pat_..."Media
GET/api/cms/mediaList media
Responses
- 200Every media row, newest first.
Examples
List media
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/media"{
"data": [
{
"id": "cmtyxp8my000dyof66u96lqug",
"filename": "fixture-image.png",
"original_filename": "fixture-image.png",
"file_path": "/uploads/fixture-image.png",
"file_size": 1024,
"mime_type": "image/png",
"alt_text": "Fixture image"
}
]
}POST/api/cms/mediaUpload a media file
`multipart/form-data`. Stored on S3 in production; falls back to local `public/uploads` in dev when AWS credentials are absent. Image dimensions are probed best-effort.
Request body schema (multipart/form-data)
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"description": "multipart/form-data fields",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "The file to upload."
},
"alt_text": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
"file"
]
}Responses
- 201The created media row.
- 400No file provided.
Examples
Upload a file
curl -X POST "https://cms.interactor.com/api/cms/media" -H "Authorization: Bearer cms_pat_..." \
-F "file=@photo.png;type=image/png" -F "alt_text=A fixture image"{
"data": {
"id": "cmtyygqcn000btrf6n8shd4xv",
"filename": "1789252035358-fixture-upload.png",
"original_filename": "fixture-upload.png",
"file_path": "/uploads/1789252035358-fixture-upload.png",
"mime_type": "image/png",
"alt_text": "A fixture image"
}
}GET/api/cms/media/{id}Get one media row
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The media row's id. |
Responses
- 200The media row.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a media row
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/media/cmtyxp8my000dyof66u96lqug"{
"data": {
"id": "cmtyxp8my000dyof66u96lqug",
"filename": "fixture-image.png"
}
}DELETE/api/cms/media/{id}Delete a media row (and its underlying file)
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The media row's id. |
Responses
- 204Deleted.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Delete a media row
curl -X DELETE "https://cms.interactor.com/api/cms/media/cmtyygqcn000btrf6n8shd4xv" -H "Authorization: Bearer cms_pat_..."FAQs
GET/api/cms/faqsList FAQ entries
Reuses the Post content type's permission set (`content:view`/`create`/...) rather than a parallel `faq:*` set. `?status=published` is readable by any signed-in caller; any other filter (or none) requires `content:view`.
Query parameters
| Name | Type | Description |
|---|---|---|
| status | string | One of: draft, review, published. |
| category | string | One of: pricing, self-hosting, security, hosted-fleet, ci, billing. |
| audience | string | One of: public, sales-only. |
Responses
- 200Matching FAQ entries.
Examples
List published FAQs
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/faqs?status=published"{
"data": [
{
"id": "cmtyxp8m4000byof69fkfsnzw",
"slug": "what-is-the-api-docs-foundation",
"question": "What is the API docs foundation?",
"category": "self-hosting",
"audience": "public",
"status": "published"
}
]
}POST/api/cms/faqsCreate a FAQ entry
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"question": {
"type": "string"
},
"answer": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified question."
},
"category": {
"type": "string",
"enum": [
"pricing",
"self-hosting",
"security",
"hosted-fleet",
"ci",
"billing"
]
},
"audience": {
"type": "string",
"enum": [
"public",
"sales-only"
],
"default": "sales-only"
},
"status": {
"type": "string",
"enum": [
"draft",
"review",
"published"
],
"default": "draft",
"description": "Publishing requires `content:publish`; otherwise the FAQ is saved as a draft even if `published` is requested."
},
"last_verified": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"verify_every_days": {
"type": "integer",
"default": 365
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
},
"related": {
"type": "array",
"items": {
"type": "string"
},
"description": "Slugs of other FAQ entries."
}
},
"required": [
"question",
"answer",
"category"
]
}Responses
- 201Created. Carries a `warning` instead of erroring if `published` was requested without `content:publish`.
- 400Missing question/answer, or an invalid category/audience/status.
- 409A FAQ with this slug already exists.
Examples
Create a FAQ
curl -X POST "https://cms.interactor.com/api/cms/faqs" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"question":"Is there a throwaway FAQ?","answer":"Yes, for docs.","category":"ci"}'{
"data": {
"id": "cmtyygtuy000ctrf6brww2pt4",
"slug": "is-there-a-throwaway-faq",
"question": "Is there a throwaway FAQ?",
"status": "draft"
}
}GET/api/cms/faqs/{id}Get one FAQ entry, with its answer revision history
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The FAQ's database id. |
Responses
- 200The FAQ, including `revisions`.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Fetch a FAQ
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/faqs/cmtyxp8m4000byof69fkfsnzw"{
"data": {
"id": "cmtyxp8m4000byof69fkfsnzw",
"question": "What is the API docs foundation?",
"revisions": []
}
}PUT/api/cms/faqs/{id}Update a FAQ entry
A change to `answer` snapshots the OUTGOING answer into `FaqRevision` first. A status transition to/from `published` without `content:publish` is silently dropped (the rest of the update still applies).
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The FAQ's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"question": {
"type": "string"
},
"answer": {
"type": "string"
},
"slug": {
"type": "string",
"description": "Defaults to a slugified question."
},
"category": {
"type": "string",
"enum": [
"pricing",
"self-hosting",
"security",
"hosted-fleet",
"ci",
"billing"
]
},
"audience": {
"type": "string",
"enum": [
"public",
"sales-only"
],
"default": "sales-only"
},
"status": {
"type": "string",
"enum": [
"draft",
"review",
"published"
],
"default": "draft",
"description": "Publishing requires `content:publish`; otherwise the FAQ is saved as a draft even if `published` is requested."
},
"last_verified": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"verify_every_days": {
"type": "integer",
"default": 365
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
},
"related": {
"type": "array",
"items": {
"type": "string"
},
"description": "Slugs of other FAQ entries."
}
}
}Responses
- 200The updated FAQ.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Slug collision.
Examples
Update a FAQ's answer
curl -X PUT "https://cms.interactor.com/api/cms/faqs/cmtyygtuy000ctrf6brww2pt4" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"answer":"Yes indeed, updated answer."}'{
"data": {
"id": "cmtyygtuy000ctrf6brww2pt4",
"answer": "Yes indeed, updated answer."
}
}DELETE/api/cms/faqs/{id}Delete a FAQ entry
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The FAQ's database id. |
Responses
- 204Deleted.
Examples
Delete a FAQ
curl -X DELETE "https://cms.interactor.com/api/cms/faqs/cmtyygtuy000ctrf6brww2pt4" -H "Authorization: Bearer cms_pat_..."Content types
GET/api/cms/content-typesList the organization's content-type registry
Merges registered rows with built-in seeds (blog/news/announcement/article) and any type already in use but never registered — for discoverability, not enforcement (`Post.type` carries no FK to this table).
Responses
- 200The merged list.
Examples
List content types
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/content-types"{
"data": [
{
"id": "builtin:blog",
"slug": "blog",
"name": "Blog"
},
{
"id": "cmtyxp8it0007yof626j6i4tk",
"slug": "release-note",
"name": "Release note",
"description": "A short release announcement"
}
]
}POST/api/cms/content-typesRegister a content type
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"slug": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"name": {
"type": "string",
"description": "Defaults to a title-cased slug."
},
"description": {
"type": "string"
},
"sort_order": {
"type": "integer",
"default": 100
}
},
"required": [
"slug"
]
}Responses
- 201The created content type.
- 400Invalid slug (must be lowercase kebab-case).
- 409A content type with this name or slug already exists.
Examples
Register a content type
curl -X POST "https://cms.interactor.com/api/cms/content-types" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"slug":"case-study"}'{
"data": {
"id": "cmtyygxjk000etrf6vytqqtgt",
"slug": "case-study",
"name": "Case Study",
"sort_order": 100
}
}Sites
GET/api/cms/sitesList the organization's distribution-target registry
Merges registered rows with built-in seeds (`website`) and any slug already in use on a post but never registered.
Responses
- 200The merged list.
Examples
List sites
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/sites"{
"data": [
{
"id": "builtin:website",
"slug": "website",
"name": "Interactor Website"
},
{
"id": "cmtyxp8k00008yof6dnkzb05g",
"slug": "product-manager",
"name": "Product Manager",
"description": "product-manager's Blog section"
}
]
}POST/api/cms/sitesRegister a distribution target
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"slug": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"name": {
"type": "string",
"description": "Defaults to a title-cased slug."
},
"description": {
"type": "string"
},
"sort_order": {
"type": "integer",
"default": 100
}
},
"required": [
"slug"
]
}Responses
- 201The created site.
- 400Invalid slug.
- 409A site with this name or slug already exists.
Examples
Register a site
curl -X POST "https://cms.interactor.com/api/cms/sites" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"slug":"partner-portal"}'{
"data": {
"id": "cmtyygy1t000ftrf6as76ljpu",
"slug": "partner-portal",
"name": "Partner Portal",
"sort_order": 100
}
}PUT/api/cms/sites/{id}Rename or update a site
A built-in seed has no row here (its id is `builtin:<slug>`), so it 404s — registering a row with the same slug is how an org overrides a seed.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The site's database id (not `builtin:...`). |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"slug": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"sort_order": {
"type": "integer"
}
}
}Responses
- 200The updated site.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409Name/slug collision.
Examples
Update a site's description
curl -X PUT "https://cms.interactor.com/api/cms/sites/cmtyygy1t000ftrf6as76ljpu" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"description":"A partner-facing distribution target"}'{
"data": {
"id": "cmtyygy1t000ftrf6as76ljpu",
"description": "A partner-facing distribution target"
}
}DELETE/api/cms/sites/{id}Remove a site from the registry
Refuses while any post still targets the slug — `Post.platforms` carries no FK, so nothing else would stop a post from silently pointing at a site the editor no longer offers.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The site's database id. |
Responses
- 204Removed.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 409One or more posts still target this site.
Examples
Remove an unused site
curl -X DELETE "https://cms.interactor.com/api/cms/sites/cmtyygy1t000ftrf6as76ljpu" -H "Authorization: Bearer cms_pat_..."Removing a site still in use
curl -X DELETE "https://cms.interactor.com/api/cms/sites/cmtyxp8k00008yof6dnkzb05g" -H "Authorization: Bearer cms_pat_..."{
"error": "1 post still target \"Product Manager\". Retarget them before removing it."
}Tokens
GET/api/cms/tokensList the caller's own personal access tokens
Session-only by design — a leaked token must never be usable to enumerate, mint, or revoke other tokens. A `cms_pat_...` bearer here is refused with the same 401 as no credential at all.
Responses
- 200The caller's tokens (never the secret, only `token_prefix`).
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
A personal access token is refused here
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/tokens"{
"error": "Unauthorized"
}POST/api/cms/tokensMint a new personal access token
Session-only, for the same reason as GET. The raw token is returned exactly once, in this response.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"organization_id": {
"type": "string",
"description": "Defaults to the session's active org; must be one of the caller's own memberships."
},
"site_scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Defaults to unscoped (every site in the org)."
},
"expires_in_days": {
"type": "number"
}
},
"required": [
"name"
]
}Responses
- 201`{ data: { ...token metadata, token: "cms_pat_..." } }`.
- 400Missing name, or an unknown site slug.
- 403`organization_id` names an org the caller doesn't belong to.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
A personal access token is refused here
curl -X POST "https://cms.interactor.com/api/cms/tokens" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"name":"x"}'{
"error": "Unauthorized"
}DELETE/api/cms/tokens/{id}Revoke a personal access token
Session-only. Revokes (keeps the audit row) rather than deleting. Only the token's own owner may revoke it.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The token's id. |
Responses
- 204Revoked.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" } - 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
A personal access token is refused here
curl -X DELETE "https://cms.interactor.com/api/cms/tokens/cmtyxp8n2000eyof6atc041kn" -H "Authorization: Bearer cms_pat_..."{
"error": "Unauthorized"
}GET/api/cms/tokens/sitesList the sites a new token for an organization may be scoped to
Session-only. Backs the token-minting dialog's site picker — answers for `?organization_id=`, not the caller's active org, so a multi-org user picking another org in the dialog sees the right list.
Query parameters
| Name | Type | Description |
|---|---|---|
| organization_id | string | Defaults to the session's active org. |
Responses
- 200The named organization's sites.
- 403Not a member of that organization.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
A personal access token is refused here
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/tokens/sites"{
"error": "Unauthorized"
}Automation
POST/api/automation/faqDraft a FAQ entry from the intake pipeline
For the intake/freshness automation, not the CMS UI. Always creates the FAQ as `status: "draft"` regardless of any `status` sent — publishing is structurally a human action in the CMS UI, not a permission this token could be granted.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"question": {
"type": "string"
},
"answer": {
"type": "string",
"description": "Defaults to the literal string \"TODO\" when omitted."
},
"category": {
"type": "string",
"enum": [
"pricing",
"self-hosting",
"security",
"hosted-fleet",
"ci",
"billing"
]
},
"audience": {
"type": "string",
"enum": [
"public",
"sales-only"
],
"default": "sales-only"
},
"slug": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
},
"related": {
"type": "array",
"items": {
"type": "string"
}
},
"verify_every_days": {
"type": "integer",
"default": 365
}
},
"required": [
"question",
"category"
]
}Responses
- 201The created draft FAQ.
- 400Missing question, or an invalid category/audience.
- 409Slug collision.
Examples
Draft a FAQ from an intake question
curl -X POST "https://cms.interactor.com/api/automation/faq" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"question":"How does the intake automation work?","answer":"It drafts FAQs from support questions.","category":"ci"}'{
"data": {
"id": "cmtyyh8ku000htrf6eufec5ps",
"slug": "how-does-the-intake-automation-work",
"status": "draft"
}
}PATCH/api/automation/faq/{id}Update a FAQ entry from the freshness pipeline
Structurally refuses `status: "published"` with a 403 — unconditionally, not merely "unless the token lacks content:publish". `increment_asked_count: true` bumps the freshness counter.
Path parameters
| Name | Type | Description |
|---|---|---|
| id* | string | The FAQ's database id. |
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"properties": {
"question": {
"type": "string"
},
"answer": {
"type": "string"
},
"category": {
"type": "string",
"enum": [
"pricing",
"self-hosting",
"security",
"hosted-fleet",
"ci",
"billing"
]
},
"audience": {
"type": "string",
"enum": [
"public",
"sales-only"
]
},
"status": {
"type": "string",
"enum": [
"draft",
"review"
],
"description": "`published` is always refused (403) — see below."
},
"last_verified": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"verify_every_days": {
"type": "integer"
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
},
"related": {
"type": "array",
"items": {
"type": "string"
}
},
"increment_asked_count": {
"type": "boolean"
}
}
}Responses
- 200The updated FAQ.
- 400`status` was neither `draft` nor `review`, or an invalid category/audience.
- 403`status: "published"` was requested — always refused on this endpoint.
- 404No resource with that id/slug in this organization.
{ "error": "Not found" }
Examples
Move a FAQ to review and bump its ask count
curl -X PATCH "https://cms.interactor.com/api/automation/faq/cmtyyh8ku000htrf6eufec5ps" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"status":"review","increment_asked_count":true}'{
"data": {
"id": "cmtyyh8ku000htrf6eufec5ps",
"status": "review",
"asked_count": 1
}
}Attempting to publish is refused
curl -X PATCH "https://cms.interactor.com/api/automation/faq/cmtyyh8ku000htrf6eufec5ps" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
-d '{"status":"published"}'{
"error": "This endpoint cannot publish a FAQ — publishing is a human action in the CMS UI."
}Identity
GET/api/cms/workspacesList the workspaces a connection can reach
A workspace is `<account email>/<organization slug>/<site slug>` (the site part optional). A connection made with "All my organizations" on the connector's consent page is not bound to one organization: it reaches every organization its accounts belong to (the owner's, plus any added with "Add another account"), and each request says where it acts with an `X-CMS-Workspace` header (MCP tools: the `workspace` argument). Without one, such a request is refused with the list, unless the connection reaches exactly one organization. The site part narrows the request like a token site scope. A one-organization token accepts a workspace naming its own organization (to narrow to a site) and refuses any other. Backs the `list_workspaces` MCP tool. With a browser session, lists the signed-in account's organizations.
Responses
- 200`all_organizations`, the connection's `accounts`, and `workspaces`.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
List a two-account connection's workspaces (site entries shown)
curl https://cms.interactor.com/api/cms/workspaces -H "Authorization: Bearer cms_pat_..."{
"data": {
"all_organizations": true,
"accounts": [
"dev@example.com",
"second@example.com"
],
"workspaces": [
{
"workspace": "dev@example.com/dev-example-com-s-organization/website",
"account": "dev@example.com",
"organization": {
"id": "cmuehl37h0002qi8os5sfcyte",
"slug": "dev-example-com-s-organization",
"name": "dev@example.com's Organization"
},
"role": "owner",
"site": {
"slug": "website",
"name": "Website",
"url": null
}
},
{
"workspace": "second@example.com/second-example-com-s-organization/website",
"account": "second@example.com",
"organization": {
"id": "cmuf311nh00017gf6uockl20t",
"slug": "second-example-com-s-organization",
"name": "second@example.com's Organization"
},
"role": "owner",
"site": {
"slug": "website",
"name": "Website",
"url": null
}
}
]
}
}GET/api/meWho am I, and what may I do
The one endpoint that answers what the caller is allowed to do — call this first with a new token, and again after any refusal, before assuming a permission is missing. A token carries no scopes of its own: `permissions` is always the owner's live membership role in the org the token is bound to.
Responses
- 200Actor, organization, membership role, flattened permissions, and (for a token) its identity.
- 401No session cookie and no recognized `Authorization: Bearer cms_pat_...` header.
{ "error": "Unauthorized" }
Examples
whoami, via a personal access token
curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/me"{
"data": {
"user": {
"id": "cmtyxp8h50002yof6qpeapon9",
"email": "apidocs-admin@example.com",
"name": "API Docs Admin"
},
"organization": {
"id": "cmtyxp8ei0000yof6wc0ugurh",
"name": "API Docs Fixture Org",
"slug": "api-docs-fixture-org"
},
"membership_role": "super_admin",
"permissions": [
"content:create",
"content:edit",
"content:publish",
"content:view"
],
"auth_method": "token",
"token": {
"id": "cmtyxp8n2000eyof6atc041kn",
"name": "API docs fixture token",
"token_prefix": "cms_pat_ZH3h",
"site_scopes": []
}
}
}A lower-privilege token sees fewer permissions
curl -H "Authorization: Bearer cms_pat_...(guest author)" "https://cms.interactor.com/api/me"{
"data": {
"user": {
"id": "cmtyxp8i70004yof6kgfe53h9",
"email": "apidocs-guest@example.com",
"name": "API Docs Guest Author"
},
"membership_role": "guest_author",
"permissions": [
"admin:access",
"content:create",
"content:view",
"media:view"
],
"auth_method": "token"
}
}MCP
POST/api/mcpRemote MCP server (Streamable HTTP, stateless)
For LLM clients (Claude Code, Claude Desktop, any MCP client) to manage CMS content — every tool delegates in-process to the matching `/api/cms` route with the same bearer, so RBAC/tenancy/sanitization are the REST API's own. Authenticates with a personal access token ONLY — unlike the `pat-or-session` endpoints elsewhere in this document, a browser session cookie is never accepted here, since an MCP client has no session to send. A missing/invalid token gets a 401 with a `WWW-Authenticate: Bearer` challenge before any JSON-RPC handling, so MCP clients' own auth discovery works.
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
{
"type": "object",
"description": "A JSON-RPC 2.0 request per the MCP Streamable HTTP transport (e.g. `initialize`, `tools/list`, `tools/call`)."
}Responses
- 200A `text/event-stream` (or plain JSON) JSON-RPC response.
- 401Missing, malformed, unknown, revoked, or expired token.
{ "error": "Unauthorized: pass a personal access token as 'Authorization: Bearer cms_pat_...'" }
Examples
No credential
curl -X POST "https://cms.interactor.com/api/mcp" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'{
"error": "Unauthorized: pass a personal access token as 'Authorization: Bearer cms_pat_...'"
}initialize handshake
curl -X POST "https://cms.interactor.com/api/mcp" -H "Authorization: Bearer cms_pat_..." \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"docs-example","version":"1.0.0"}}}'event: message
data: {"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{"listChanged":true}},"serverInfo":{"name":"interactor-cms","version":"1.0.0"},"instructions":"Content management for the Interactor CMS..."},"jsonrpc":"2.0","id":1}
Comments
Matches the admin gating used for the other submission-review surfaces (`admin:access`) rather than a `content:*` permission. Note: the response is a bare array, not `{ data: [...] }`.
Query parameters
Responses
Examples
List pending comments
Path parameters
Request body schema
JSON Schema, not a literal payload — see the examples below for a real request body.
Responses
Examples
Publish a comment
Path parameters
Responses
Examples
Delete a comment