Management API

Overview

The REST API for automating your content workflow: plan, write, review and publish.

The management API is a JSON REST API at https://api.pmkin.io. It does what people do in PMKIN: plan documents, write briefs, draft content, review, schedule and publish. Scripts, CI jobs and AI agents use it to run your content process without the web app.

Your website doesn’t need it. To show published content, use the read-only delivery API. AI clients that speak the Model Context Protocol can use the MCP server, which offers the same operations as tools.

Basics#

  • Every request needs a management token in the Authorization header. A token belongs to one project, so paths have no project id.
  • Request bodies are JSON, at most 20 MB. Send Content-Type: application/json. Fields the API doesn’t know are ignored.
  • Responses are JSON with camelCase keys. Ids are 24-character hex strings.
  • Lists take limit and offset. A page shorter than limit is the last one.
  • Errors have a _tag naming the error and a message that says what to do about it.

Health check#

GET /health needs no token and answers when the API is up.

Terminal
curl https://api.pmkin.io/health
{"status":"ok"}

How documents are created#

There is no POST /documents. You create documents, clusters and categories through intents: start a draft, fill it in over as many requests as you need, then confirm it. Confirming checks every field and reports every problem together.

Write safely
Content writes take baseVersion, the version from your last read. If someone changed the document since, the write fails with a 409 instead of overwriting their work. See content and edits.

Reference#