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.

No credential required

Query parameters

NameTypeDescription
typestringFilter to one content type (e.g. `blog`).
category_idstringFilter to one category id.
platformstringFilter to posts targeting this site slug (`Post.platforms`). Omit to get every published post regardless of distribution target.
author_slugstringFilter 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.
pageinteger1-indexed page number. Default 1.
per_pageintegerPage size, capped at 100. Default 50.

Responses

  • 200
    A 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"
200
{
  "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.

No credential required

Path parameters

NameTypeDescription
slug*stringThe post's slug, or a slug it used to have.

Query parameters

NameTypeDescription
platformstring404 the post if it does not target this site slug.

Responses

  • 200
    The post, including its category and author; or `{redirect_slug}` for a retired slug.
  • 404
    No 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"
200
{
  "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"
200
{
  "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"
200

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.

No credential required

Path parameters

NameTypeDescription
slug*stringThe post's slug.

Responses

  • 200
    The post's published comments.
  • 404
    No 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"
200
{
  "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.

No credential required

Path parameters

NameTypeDescription
slug*stringMust 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

  • 201
    Comment accepted, pending moderation.
  • 400
    Missing field, invalid email, or content over 2000 characters.
  • 404
    No 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!"}'
201
{
  "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.

No credential required

Query parameters

NameTypeDescription
categorystringOne of: pricing, self-hosting, security, hosted-fleet, ci, billing.

Responses

  • 200
    Matching FAQ entries.
  • 400
    Unknown `category` value.

Examples

List public FAQs in a category

curl "https://cms.interactor.com/api/public/faq?category=self-hosting"
200
{
  "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.

No credential required

Path parameters

NameTypeDescription
id*stringThe FAQ's slug.

Responses

  • 200
    The FAQ entry.
  • 404
    No 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"
200
{
  "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"
404
{
  "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.

No credential required

Query parameters

NameTypeDescription
platform*stringThe registered site slug to build the feed for.

Responses

  • 200
    `application/rss+xml` body.
  • 400
    `?platform=` was omitted.
  • 404
    No 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"
200

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).

No credential required

Query parameters

NameTypeDescription
platform*stringThe registered site slug to build the sitemap for.

Responses

  • 200
    `application/xml` body.
  • 400
    `?platform=` was omitted.
  • 404
    No 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"
200

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.

No credential required

Query parameters

NameTypeDescription
platform*stringThe registered site slug to build the index for.

Responses

  • 200
    `text/plain` body.
  • 400
    `?platform=` was omitted.
  • 404
    No 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"
200

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).

No credential required

Query parameters

NameTypeDescription
platform*stringThe registered site slug to fetch the key for.

Responses

  • 200
    `{data: {key}}`.
  • 400
    `?platform=` was omitted.
  • 404
    No 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"
200
{
  "data": {
    "key": "3a1f9c2b8e4d4a5f9b1c7e2d6a0f8b3c"
  }
}
GET
/api/public/categoriesList categories with published-post counts
No credential required

Responses

  • 200
    Every category in the organization, with `post_count`.

Examples

List categories

curl "https://cms.interactor.com/api/public/categories"
200
{
  "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.

No credential required

Responses

  • 200
    Database reachable.
  • 503
    Database unreachable.

Examples

Health check

curl "https://cms.interactor.com/api/public/health"
200
{
  "status": "ok"
}
GET
/api/public/openapi.jsonThis OpenAPI 3.1 document

Generated from this spec file at request time. Unauthenticated, CORS-enabled.

No credential required

Responses

  • 200
    The OpenAPI 3.1 document.

Examples

Fetch the OpenAPI document

curl "https://cms.interactor.com/api/public/openapi.json"
200

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.

No credential required

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

  • 201
    Submission stored.
  • 400
    Missing required field(s) or an invalid email.
  • 410
    Any type other than "question": those inquiries go to Interactor CRM.
  • 500
    Internal 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"}'
201
{
  "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.

Personal access token or session
Requires content:view (unless ?status=published)

Query parameters

NameTypeDescription
statusstringe.g. `draft`, `published`.
typestringFilter by content type.
category_idstringFilter by category.
sitestringA site slug: only posts targeting that site (`Post.platforms` contains it).
searchstringCase-insensitive text matched against title, slug, excerpt and body (first 200 characters used).
workflow_statusstring`draft` | `pending_review` | `approved` | `rejected`.
publishedstring`true` is shorthand for `status=published`.
pageintegerDefault 1.
per_pageintegerDefault 50, capped at 100.

Responses

  • 200
    A page of posts.
  • 401
    No 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"
200
{
  "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"
401
{
  "error": "Unauthorized"
}
POST
/api/cms/postsCreate a post
Personal access token or session
Requires content:create

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

  • 201
    Post 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.
  • 403
    Site-scope refusal (create must target only in-scope sites), or `content:edit_any` needed to set `author_id`.
  • 409
    A 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"]}'
201
{
  "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
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    The post.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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"
200
{
  "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"
404
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The updated post.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not the post's author (needs `content:edit_any`), or a site-scope refusal.
  • 409
    Optimistic-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"
      }
    }
  • 409
    The 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."}'
200
{
  "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."}'
403
{
  "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.

Personal access token or session
Requires content:delete

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 204
    Moved to the trash.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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_..."
204
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.

Personal access token or session
Requires content:view

Query parameters

NameTypeDescription
searchstringCase-insensitive text matched against title and slug.

Responses

  • 200
    Trash entries and `retention_days`.
  • 401
    No 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_..."
200
{
  "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.

Personal access token or session
Requires content:create

Path parameters

NameTypeDescription
id*stringThe trash entry's id (from the trash list), not the post's.

Responses

  • 201
    The restored post's id, slug, title and status (`draft`).
  • 404
    Not in the trash: already restored, or removed after 30 days.
  • 403
    The 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_..."
201
{
  "data": {
    "id": "cmuex7s3j00003rf6b4h8s5zm",
    "slug": "trash-test",
    "title": "Trash test",
    "status": "draft"
  }
}
GET
/api/cms/posts/{id}/socialA post's social copy

The current draft per network (`linkedin`, `twitter`, `facebook`, `instagram`, `reddit`, `slack`) written for this post: the newest non-archived social post whose source is the post. Networks with none are left out. `editable` is false once the copy has been published. Backs the `list_social_drafts` MCP tool.

Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    The drafts.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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

Read a post's social copy

curl "https://cms.interactor.com/api/cms/posts/cmuex7s3j00003rf6b4h8s5zm/social" -H "Authorization: Bearer cms_pat_..."
200
{
  "data": [
    {
      "id": "cmuex7wy300013rf603nnmlm1",
      "network": "linkedin",
      "body": "New post: Trash test.",
      "parts": [],
      "status": "draft",
      "scheduled_at": null,
      "published_at": null,
      "updated_at": "2026-09-24T02:36:43.275Z",
      "editable": true
    }
  ]
}
PUT
/api/cms/posts/{id}/socialWrite a post's social copy for one network

Saves `body` as the network's draft for this post: edits the current draft, or starts one. Copy that has already been published is never rewritten; saving then starts a new draft. An empty body removes an unscheduled draft (`data: null`, `removed: true`). For an X thread, separate tweets with a line containing only `---`: the copy is stored as its first tweet plus thread parts, and each tweet is published as a reply to the one before. On X, LinkedIn and Facebook a `--- first comment` line starts a comment posted under the post once it is live. Reading answers the same text back, with `parts` beside it. Scheduling and publishing stay in the Social queue. Backs the `save_social_draft` MCP tool.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.

Request body schema

JSON Schema, not a literal payload — see the examples below for a real request body.

{
  "type": "object",
  "required": [
    "network",
    "body"
  ],
  "properties": {
    "network": {
      "type": "string",
      "enum": [
        "linkedin",
        "twitter",
        "facebook",
        "instagram",
        "reddit",
        "slack"
      ]
    },
    "body": {
      "type": "string",
      "maxLength": 10000
    }
  }
}

Responses

  • 200
    The saved draft (or null when removed).
  • 400
    Unknown network, or a body that isn't a string.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not the post's own author (needs `content:edit_any`), or a site-scope refusal.

Examples

Write the LinkedIn copy

curl -X PUT "https://cms.interactor.com/api/cms/posts/cmuex7s3j00003rf6b4h8s5zm/social" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"network":"linkedin","body":"New post: Trash test."}'
200
{
  "data": {
    "id": "cmuex7wy300013rf603nnmlm1",
    "network": "linkedin",
    "body": "New post: Trash test.",
    "parts": [],
    "status": "draft",
    "scheduled_at": null,
    "published_at": null,
    "updated_at": "2026-09-24T02:36:43.275Z",
    "editable": true
  },
  "removed": false
}
GET
/api/cms/posts/{id}/social/destinationsWhere a post's social copy goes

Every place this post's social copy can be posted to (a Facebook Page, a Slack channel, a subreddit, a manual channel), with `selected` saying whether this post uses it. `state` is `ready`, or `trouble` when the connection needs reconnecting. `overridden` is true when the post made its own choice instead of the channels' defaults. `backlink` is the link each social post carries back to the post, or null when the post has no public address yet.

Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    The destinations.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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

Read where a post's social copy goes

curl "https://cms.interactor.com/api/cms/posts/cmuex7s3j00003rf6b4h8s5zm/social/destinations" -H "Authorization: Bearer cms_pat_..."
200
{
  "data": {
    "destinations": [
      {
        "id": "cmus8x2ab00019b8o4t1m9q0z",
        "network": "facebook",
        "service_name": "Facebook Page",
        "account_name": "Interactor",
        "state": "ready",
        "manual": false,
        "selected": true,
        "is_default": true
      }
    ],
    "overridden": false,
    "backlink": "https://example.com/blog/trash-test"
  }
}
PUT
/api/cms/posts/{id}/social/destinationsChoose where a post's social copy goes

Stores this post's own choice of destinations and brings its unsent social drafts in line: one target per chosen place of each draft's network. Send `channel_ids: null` to go back to the channels' defaults. Ids that aren't this organization's channels are dropped. Copy that was already submitted, scheduled or published is left as it is.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.

Request body schema

JSON Schema, not a literal payload — see the examples below for a real request body.

{
  "type": "object",
  "required": [
    "channel_ids"
  ],
  "properties": {
    "channel_ids": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "The channel ids this post's copy goes to, or null for the channels' defaults."
    }
  }
}

Responses

  • 200
    The destinations after the change.
  • 400
    `channel_ids` is neither a list of ids nor null.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not the post's own author (needs `content:edit_any`), or a site-scope refusal.

Examples

Send this post to one Page only

curl -X PUT "https://cms.interactor.com/api/cms/posts/cmuex7s3j00003rf6b4h8s5zm/social/destinations" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" -d '{"channel_ids":["cmus8x2ab00019b8o4t1m9q0z"]}'
200
{
  "data": {
    "destinations": [
      {
        "id": "cmus8x2ab00019b8o4t1m9q0z",
        "network": "facebook",
        "service_name": "Facebook Page",
        "account_name": "Interactor",
        "state": "ready",
        "manual": false,
        "selected": true,
        "is_default": true
      }
    ],
    "overridden": true,
    "backlink": "https://example.com/blog/trash-test"
  }
}
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.

Personal access token or session
Requires content:view (unless ?status=published)

Path parameters

NameTypeDescription
slug*stringThe post's slug.

Query parameters

NameTypeDescription
statusstringRestrict the lookup to this status.

Responses

  • 200
    The post.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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"
200
{
  "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.

Personal access token or session
Requires content:view

Query parameters

NameTypeDescription
statusstringFilter 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.zip
200

Binary 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
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    `text/markdown` body: frontmatter + content.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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"
200
---
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.

Personal access token or session
Requires content: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

  • 204
    Matched posts deleted (or nothing matched).
  • 403
    Site-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"]}'
204
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.

Personal access token or session
Requires content:create

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

  • 200
    Suggested meta_description, meta_keywords, excerpt, featured_image_alt.
  • 400
    Both `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>"}'
200
{
  "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.

Personal access token or session
Requires content:create

Query parameters

NameTypeDescription
forcebooleanBypass 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

  • 201
    New post created.
  • 200
    Existing post updated.
  • 409
    Conflict: the base hash in the frontmatter no longer matches (someone edited in the CMS since).
  • 400
    Malformed 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"}'
201
{
  "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.

Personal access token or session
Requires content:view (plus an action-specific permission — see description)

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The 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).
  • 400
    Unknown or missing `action`.
  • 403
    Missing the action's permission (`content:approve`/`content:reject`/`content:publish`), or not the post's own author for `submit`.
  • 409
    The post isn't in the state the action requires (e.g. approving a non-pending post).
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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"}'
200
{
  "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"}'
200
{
  "data": {
    "id": "cmtyxp8le000ayof6g5jnv6l4",
    "workflow_status": "approved",
    "approved_by_id": "cmtyxp8h50002yof6qpeapon9"
  }
}
GET
/api/cms/posts/{id}/workflowGet a post's approval history
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    Every `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"
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The post with `sync_conflict: false`.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Optimistic-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"
      }
    }
  • 403
    The 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 '{}'
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 201
    The new checkpoint's metadata.
  • 200
    The newest revision already matched; it now carries the label.
  • 400
    Missing label, or longer than 200 characters.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not 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"}'
201
{
  "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.

Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Query parameters

NameTypeDescription
pageintegerDefault 1.
per_pageintegerDefault 50, capped at 100.

Responses

  • 200
    A page of revision metadata.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    The 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"
200
{
  "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
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.
revisionId*stringThe revision's id.

Responses

  • 200
    The full revision, including content and content_html.
  • 404
    No 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"
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.
revisionId*stringThe 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

  • 200
    The restored post.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Optimistic-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"
      }
    }
  • 403
    The 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 '{}'
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    The signed preview URL and its expiry.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not 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 '{}'
200
{
  "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.

Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    The readiness result.
  • 404
    No 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"
200
{
  "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.

Personal access token or session
Requires content:view

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.
  • 400
    Unknown site.
  • 403
    The 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"}'
200
{
  "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.

Personal access token or session
Requires content:view

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

  • 200
    The workspace, `mirror_key`, `mirror_url`, the site and the key's expiry.
  • 400
    Unknown site.
  • 403
    The 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"}'
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 200
    Preview URL, edit key and its expiry, and the sync file URL.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not 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_..."
200
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe post's database id.

Responses

  • 201
    The post's new `featured_image`/`featured_image_alt` and the created media id.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 403
    Not the post's own author (needs `content:edit_any`), or a site-scope refusal.
  • 502
    Rendering 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_..."
201
{
  "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"
  }
}
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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The post with the replacements applied (or unchanged, if the replacements were a no-op).
  • 400
    A replacement's anchor matched the wrong number of times; names which one and how many matches were found.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Optimistic-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"
      }
    }
  • 403
    The 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"}]}'
200
{
  "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"}]}'
400
{
  "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
Personal access token or session
Requires content:view

Responses

  • 200
    Every category, sorted by sort_order then name.

Examples

List categories

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/categories"
200
{
  "data": [
    {
      "id": "cmtyxp8il0006yof66fgkf2b5",
      "name": "Product Updates",
      "slug": "product-updates",
      "description": "Release notes and product news"
    }
  ]
}
POST
/api/cms/categoriesCreate a category
Personal access token or session
Requires categories:manage

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

  • 201
    The created category.
  • 409
    A 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"}'
201
{
  "data": {
    "id": "cmtyyglwl000atrf6g12cxn2y",
    "name": "Throwaway Category",
    "slug": "throwaway-category"
  }
}
GET
/api/cms/categories/{id}Get one category
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe category's id.

Responses

  • 200
    The category.
  • 404
    No 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"
200
{
  "data": {
    "id": "cmtyxp8il0006yof66fgkf2b5",
    "name": "Product Updates",
    "slug": "product-updates"
  }
}
PUT
/api/cms/categories/{id}Update a category
Personal access token or session
Requires categories:manage

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The updated category.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Name/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"}'
200
{
  "data": {
    "id": "cmtyyglwl000atrf6g12cxn2y",
    "description": "Updated description"
  }
}
DELETE
/api/cms/categories/{id}Delete a category
Personal access token or session
Requires categories:manage

Path parameters

NameTypeDescription
id*stringThe category's id.

Responses

  • 204
    Deleted.

Examples

Delete a category

curl -X DELETE "https://cms.interactor.com/api/cms/categories/cmtyyglwl000atrf6g12cxn2y" -H "Authorization: Bearer cms_pat_..."
204

Tags

GET
/api/cms/tagsList tags in use

A tag is nothing but the posts carrying it — this is the distinct set across posts the caller can see (filtered by site scope for a scoped token).

Personal access token or session
Requires content:view

Query parameters

NameTypeDescription
qstringCase-insensitive substring filter.

Responses

  • 200
    Sorted list of matching tag strings.

Examples

Search tags

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/tags?q=doc"
200
{
  "tags": [
    "docs"
  ]
}
DELETE
/api/cms/tagsRemove a tag from every post carrying it

Rewrites every matching post's `tags` array, so it needs `content:edit_any`. A site-scoped token's request is refused whole if the tag appears on any out-of-scope post.

Personal access token or session
Requires content:edit_any

Query parameters

NameTypeDescription
tag*stringThe exact tag to remove.

Responses

  • 204
    Removed from every post that had it.
  • 400
    Missing `tag` query param.
  • 403
    Site-scope batch refusal, naming the out-of-scope posts.

Examples

Delete a tag

curl -X DELETE "https://cms.interactor.com/api/cms/tags?tag=temp-doc-tag" -H "Authorization: Bearer cms_pat_..."
204

Media

GET
/api/cms/mediaList media
Personal access token or session
Requires media:view

Responses

  • 200
    Every media row, newest first.

Examples

List media

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/media"
200
{
  "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.

Personal access token or session
Requires media:upload

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

  • 201
    The created media row.
  • 400
    No 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"
201
{
  "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
Personal access token or session
Requires media:view

Path parameters

NameTypeDescription
id*stringThe media row's id.

Responses

  • 200
    The media row.
  • 404
    No 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"
200
{
  "data": {
    "id": "cmtyxp8my000dyof66u96lqug",
    "filename": "fixture-image.png"
  }
}
DELETE
/api/cms/media/{id}Delete a media row (and its underlying file)
Personal access token or session
Requires media:delete

Path parameters

NameTypeDescription
id*stringThe media row's id.

Responses

  • 204
    Deleted.
  • 404
    No 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_..."
204

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`.

Personal access token or session
Requires content:view (unless ?status=published)

Query parameters

NameTypeDescription
statusstringOne of: draft, review, published.
categorystringOne of: pricing, self-hosting, security, hosted-fleet, ci, billing.
audiencestringOne of: public, sales-only.

Responses

  • 200
    Matching FAQ entries.

Examples

List published FAQs

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/faqs?status=published"
200
{
  "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
Personal access token or session
Requires content:create

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

  • 201
    Created. Carries a `warning` instead of erroring if `published` was requested without `content:publish`.
  • 400
    Missing question/answer, or an invalid category/audience/status.
  • 409
    A 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"}'
201
{
  "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
Personal access token or session
Requires content:view

Path parameters

NameTypeDescription
id*stringThe FAQ's database id.

Responses

  • 200
    The FAQ, including `revisions`.
  • 404
    No 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"
200
{
  "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).

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The updated FAQ.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Slug 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."}'
200
{
  "data": {
    "id": "cmtyygtuy000ctrf6brww2pt4",
    "answer": "Yes indeed, updated answer."
  }
}
DELETE
/api/cms/faqs/{id}Delete a FAQ entry
Personal access token or session
Requires content:delete

Path parameters

NameTypeDescription
id*stringThe FAQ's database id.

Responses

  • 204
    Deleted.

Examples

Delete a FAQ

curl -X DELETE "https://cms.interactor.com/api/cms/faqs/cmtyygtuy000ctrf6brww2pt4" -H "Authorization: Bearer cms_pat_..."
204

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).

Personal access token or session
Requires content:view

Responses

  • 200
    The merged list.

Examples

List content types

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/content-types"
200
{
  "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
Personal access token or session
Requires categories:manage

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

  • 201
    The created content type.
  • 400
    Invalid slug (must be lowercase kebab-case).
  • 409
    A 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"}'
201
{
  "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.

Personal access token or session
Requires content:view

Responses

  • 200
    The merged list.

Examples

List sites

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/sites"
200
{
  "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
Personal access token or session
Requires categories:manage

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

  • 201
    The created site.
  • 400
    Invalid slug.
  • 409
    A 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"}'
201
{
  "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.

Personal access token or session
Requires categories:manage

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The updated site.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    Name/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"}'
200
{
  "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.

Personal access token or session
Requires categories:manage

Path parameters

NameTypeDescription
id*stringThe site's database id.

Responses

  • 204
    Removed.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 409
    One 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_..."
204

Removing a site still in use

curl -X DELETE "https://cms.interactor.com/api/cms/sites/cmtyxp8k00008yof6dnkzb05g" -H "Authorization: Bearer cms_pat_..."
409
{
  "error": "1 post still target \"Product Manager\". Retarget them before removing it."
}

Comments

GET
/api/cms/commentsList comments for moderation

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: [...] }`.

Personal access token or session
Requires admin:access

Query parameters

NameTypeDescription
statusstring`pending` | `published` | `spam` | `rejected`.

Responses

  • 200
    A bare array of comments, newest first.

Examples

List pending comments

curl -H "Authorization: Bearer cms_pat_..." "https://cms.interactor.com/api/cms/comments?status=pending"
200
[
  {
    "id": "cmtyxp8mo000cyof6cwhs60jl",
    "postId": "cmtyxp8kn0009yof6u7xh6cpi",
    "postTitle": "Announcing the API Docs Foundation",
    "authorName": "A Reader",
    "authorEmail": "reader@example.com",
    "content": "Great post!",
    "status": "pending"
  }
]
PATCH
/api/cms/comments/{id}Moderate a comment's status
Personal access token or session
Requires admin:access

Path parameters

NameTypeDescription
id*stringThe comment's id.

Request body schema

JSON Schema, not a literal payload — see the examples below for a real request body.

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "published",
        "spam",
        "rejected"
      ]
    }
  },
  "required": [
    "status"
  ]
}

Responses

  • 200
    `{ id, status }`.
  • 400
    Invalid status.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }

Examples

Publish a comment

curl -X PATCH "https://cms.interactor.com/api/cms/comments/cmtyxp8mo000cyof6cwhs60jl" -H "Authorization: Bearer cms_pat_..." -H "Content-Type: application/json" \
  -d '{"status":"published"}'
200
{
  "id": "cmtyxp8mo000cyof6cwhs60jl",
  "status": "published"
}
DELETE
/api/cms/comments/{id}Delete a comment
Personal access token or session
Requires admin:access

Path parameters

NameTypeDescription
id*stringThe comment's id.

Responses

  • 200
    `{ success: true }` — 200 even if nothing matched.

Examples

Delete a comment

curl -X DELETE "https://cms.interactor.com/api/cms/comments/cmtyyh46p000gtrf6ckm8c33q" -H "Authorization: Bearer cms_pat_..."
200
{
  "success": true
}

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.

Session only — no bearer token accepted

Responses

  • 200
    The caller's tokens (never the secret, only `token_prefix`).
  • 401
    No 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"
401
{
  "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.

Session only — no bearer token accepted

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_..." } }`.
  • 400
    Missing name, or an unknown site slug.
  • 403
    `organization_id` names an org the caller doesn't belong to.
  • 401
    No 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"}'
401
{
  "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.

Session only — no bearer token accepted

Path parameters

NameTypeDescription
id*stringThe token's id.

Responses

  • 204
    Revoked.
  • 404
    No resource with that id/slug in this organization.
    {
      "error": "Not found"
    }
  • 401
    No 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_..."
401
{
  "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.

Session only — no bearer token accepted

Query parameters

NameTypeDescription
organization_idstringDefaults to the session's active org.

Responses

  • 200
    The named organization's sites.
  • 403
    Not a member of that organization.
  • 401
    No 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"
401
{
  "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.

Personal access token or session
Requires content:create

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

  • 201
    The created draft FAQ.
  • 400
    Missing question, or an invalid category/audience.
  • 409
    Slug 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"}'
201
{
  "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.

Personal access token or session
Requires content:edit

Path parameters

NameTypeDescription
id*stringThe 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

  • 200
    The updated FAQ.
  • 400
    `status` was neither `draft` nor `review`, or an invalid category/audience.
  • 403
    `status: "published"` was requested — always refused on this endpoint.
  • 404
    No 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}'
200
{
  "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"}'
403
{
  "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.

Personal access token or session

Responses

  • 200
    `all_organizations`, the connection's `accounts`, and `workspaces`.
  • 401
    No 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_..."
200
{
  "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.

Personal access token or session

Responses

  • 200
    Actor, organization, membership role, flattened permissions, and (for a token) its identity.
  • 401
    No 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"
200
{
  "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"
200
{
  "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.

Personal access token or session

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

  • 200
    A `text/event-stream` (or plain JSON) JSON-RPC response.
  • 401
    Missing, 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":{}}'
401
{
  "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"}}}'
200
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}