Delivery API

Overview

The read-only GraphQL API your website uses to fetch published content.

The delivery API is how your website gets its content. It’s a read-only GraphQL API that serves the documents your team published in PMKIN, with their HTML, markdown, SEO fields, cover image and category. Ask for exactly the fields a page needs, in one request.

The endpoint#

Every request is a JSON POST to one URL:

POSThttps://content.pmkin.io/graphql

Send the query, and optionally its variables, in the body, and a delivery key in the Authorization header:

HTTP
POST /graphql HTTP/1.1
Host: content.pmkin.io
Authorization: Bearer YOUR_DELIVERY_KEY
Content-Type: application/json
{"query": "query { documents(limit: 5) { title slug } }"}

Your first request#

Fetch one published document by its slug, the way a blog post page would. Put your key in the PMKIN_API_KEY environment variable first.

curl https://content.pmkin.io/graphql \
--header "Authorization: Bearer $PMKIN_API_KEY" \
--header "Content-Type: application/json" \
--data @- <<'EOF'
{
"query": "query DocumentBySlug($slug: String!) {\n documentBySlug(slug: $slug) {\n id\n title\n subtitle\n html\n publishedAt\n metaTitle\n metaDescription\n category {\n name\n slug\n }\n }\n}",
"variables": {
"slug": "pumpkin-soup"
}
}
EOF

The response mirrors the shape of the query:

Response
{
"data": {
"documentBySlug": {
"category": {
"name": "Cooking",
"slug": "cooking"
},
"html": "<p>Roast the pumpkin first. It makes all the difference.</p>",
"id": "6650e5f3a1b2c3d4e5f60101",
"metaDescription": "A silky pumpkin soup in 30 minutes and one pot.",
"metaTitle": "Easy pumpkin soup recipe",
"publishedAt": "2026-10-01T08:00:00.000Z",
"subtitle": "Ready in 30 minutes",
"title": "The easiest pumpkin soup"
}
}
}
Prefer TypeScript?

The pmkin npm package wraps these queries with types. See the TypeScript SDK guide.

At a glance#

TopicDetails
ProtocolGraphQL over HTTPS, POST with a JSON body
AuthenticationAuthorization: Bearer <delivery key>
ContentPublished documents and all categories of the key’s project
Rate limit25 requests a second per IP address
Page sizeUp to 100 documents per list, with limit and offset
Request sizeBodies up to 256 KB

What’s next#