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:
https://content.pmkin.io/graphqlSend the query, and optionally its variables, in the body, and a delivery key in the Authorization header:
POST /graphql HTTP/1.1Host: content.pmkin.ioAuthorization: Bearer YOUR_DELIVERY_KEYContent-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:
{"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"}}}
The pmkin npm package wraps these queries with types. See the TypeScript SDK guide.
At a glance#
| Topic | Details |
|---|---|
| Protocol | GraphQL over HTTPS, POST with a JSON body |
| Authentication | Authorization: Bearer <delivery key> |
| Content | Published documents and all categories of the key’s project |
| Rate limit | 25 requests a second per IP address |
| Page size | Up to 100 documents per list, with limit and offset |
| Request size | Bodies up to 256 KB |
What’s next#
Create a delivery key and keep it safe.
All six queries, with arguments and examples.
Every field on Document and Category.
Page through long lists and fetch drafts.
What went wrong, and how to fix it.
Stay within the rate and complexity limits.