Content API
Content API
A read-only REST API for your site's published posts, pages, tags and authors. Plain JSON, no key needed to read.
Use the Content API to show your Quillhive content anywhere: your own frontend (Next.js, Astro, anything), a mobile app, a newsletter, a help center. It returns published content only. To write, use the dashboard or the MCP server.
Base URL
https://api.quillhive.com/api/public/v1Every endpoint lives under a site:
https://api.quillhive.com/api/public/v1/sites/{siteId}/...Find your site ID in the dashboard under Settings → Developer → API. That page also has a copyable base URL, an example request and a headless setup checklist.
Your first request
curl https://api.quillhive.com/api/public/v1/sites/YOUR_SITE_ID/posts?limit=3const res = await fetch(
'https://api.quillhive.com/api/public/v1/sites/YOUR_SITE_ID/posts?limit=3',
)
const { posts, meta } = await res.json()Authentication
Reading published content is public. No key is needed.
You can send a site API key as a bearer token. A key is required only for the preview endpoint, which returns drafts.
curl https://api.quillhive.com/api/public/v1/sites/YOUR_SITE_ID/posts \
-H "Authorization: Bearer blgg_..."- Create keys in Settings → Developer → API. Each key belongs to one site.
- A key must match the
siteIdin the path. A wrong, unknown or mismatched key gets a401, even on public endpoints. - Keys can read drafts. Keep them on your server and never ship them to a browser.
Endpoints
| Endpoint | Returns |
|---|---|
GET /sites/{siteId} |
Site settings, SEO fields and navigation |
GET /sites/{siteId}/navigation-items |
Header and footer menus. Filter with ?group= |
GET /sites/slug/{slug} |
A site by its slug |
GET /sites/domain/{domain} |
A site by its custom domain |
GET /sites/{siteId}/posts |
Published posts, paginated, filterable by tag and author |
GET /sites/{siteId}/posts/{idOrSlug} |
One published post or page with HTML |
GET /sites/{siteId}/posts/preview/{idOrUuid} |
Any post or page, drafts included. Key required |
GET /sites/{siteId}/pages |
Published pages |
GET /sites/{siteId}/pages/{idOrSlug} |
One published page with HTML |
GET /sites/{siteId}/tags |
Tags with post counts |
GET /sites/{siteId}/tags/{slug} |
One tag |
GET /sites/{siteId}/authors |
Author profiles |
GET /sites/{siteId}/authors/{slug} |
One author |
Conventions
- Responses are JSON objects with one named key:
{ "post": … },{ "posts": […] }. - Dates are ISO 8601 strings in UTC.
- Only published content is returned. Drafts and scheduled posts return
404, except through the preview endpoint. - Content is HTML in
html, ready to render. It is the same HTML the hosted blog uses.
Keeping a cache fresh
If you cache responses, register a webhook. Quillhive sends one when posts, pages, tags or site settings change, so you can drop just what changed.