Get started

Quick start

Create a key and fetch your first published document in five minutes.

By the end of this page you’ll have fetched a published document from PMKIN with nothing but an HTTP request. You need a PMKIN account and one project.

  1. Publish a document

    In your project, create a document, give it a title and some text, and choose Publish. The delivery API only returns published documents, so an empty project returns an empty list.

  2. Create a delivery key

    Open the project’s API page and create a key. The key can only read published content, so it’s safe on a server and in a build pipeline, but keep it out of browser code.

    Terminal
    export PMKIN_API_KEY=your-delivery-key
  3. Send your first query

    The delivery API is GraphQL at one URL. Ask for the five newest documents:

    curl https://content.pmkin.io/graphql \
    -H "Authorization: Bearer $PMKIN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"query": "{ documents(limit: 5) { title slug publishedAt } }"}'
  4. Read the response

    You get exactly the fields you asked for. Ask for html to get the body ready to render, or markdown to render it yourself.

    Response
    {
    "data": {
    "documents": [
    {
    "title": "Hello, world",
    "slug": "hello-world",
    "publishedAt": "2026-10-01T09:30:00.000Z"
    }
    ]
    }
    }
Getting a 401?
Check that the header reads Authorization: Bearer followed by the key, with one space. The errors page lists every error and its fix.

Next steps#