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
Authorizationheader. 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
limitandoffset. A page shorter thanlimitis the last one. - Errors have a
_tagnaming the error and amessagethat says what to do about it.
Health check#
GET /health needs no token and answers when the API is up.
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.
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#
Create a token and send it with each request.
List, read, update, delete and restore documents.
Review, schedule, publish and unpublish.
Write briefs and let agents claim them.
Create documents, clusters and categories.
Every status code and error, and how to fix it.