Read and write your blog's content from any stack — REST, JSON, authenticated with a per-blog API key.
Authentication Create a key in Settings → API (blog owner only). The full key is shown once — store it somewhere safe. Send it on every request: Authorization: Bearer bcms_… (the `x-api-key` header works too). Keys are scoped to one blog and give full read/write access to its content. Revoke a key anytime from the same page. Base URL Copy https://blogcms.io/api/v1
List posts GET /api/v1/posts — published posts, newest first. Query params: page (default 1), limit (default 20, max 100), status (published | draft | archived | all), tag , q (title search).
curl Copy curl https://blogcms.io/api/v1/posts?limit=5 \
-H "Authorization: Bearer bcms_YOUR_KEY"
200 Copy {
"posts": [
{
"id": "665f…",
"title": "Hello world",
"slug": "hello-world",
"content": "<p>…</p>",
"excerpt": "…",
"featuredImage": "https://…",
"tags": ["engineering"],
"status": "published",
"publishedAt": "2026-08-01T10:00:00.000Z",
"seo": { "metaTitle": "", "metaDescription": "…", "canonicalUrl": "", "ogImage": "" },
"createdAt": "…",
"updatedAt": "…"
}
],
"total": 42,
"page": 1,
"limit": 5
}
Get one post GET /api/v1/posts/:slug — a single post by slug (any status). 404 when the slug doesn't exist.
curl Copy curl https://blogcms.io/api/v1/posts/hello-world \
-H "Authorization: Bearer bcms_YOUR_KEY"
Create a post POST /api/v1/posts — body fields: title (required), content (HTML), excerpt , tags (array), slug (auto-generated from the title when omitted; de-duplicated automatically), status (draft — the default — or published). Returns 201 with the created post.
curl Copy curl -X POST https://blogcms.io/api/v1/posts \
-H "Authorization: Bearer bcms_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Shipped: our API",
"content": "<p>Hello from the API.</p>",
"tags": ["changelog"],
"status": "draft"
}'
Published posts created through the API go live on the blog's next publish, exactly like posts written in the editor.
List pages GET /api/v1/pages — the blog's published static pages (About, Contact, …).
curl Copy curl https://blogcms.io/api/v1/pages \
-H "Authorization: Bearer bcms_YOUR_KEY"
200 Copy {
"pages": [
{
"id": "665f…",
"title": "About",
"slug": "about",
"content": "<p>…</p>",
"status": "published",
"updatedAt": "2026-08-01T10:00:00.000Z"
}
]
}
List categories GET /api/v1/categories — the blog's categories, alphabetical.
curl Copy curl https://blogcms.io/api/v1/categories \
-H "Authorization: Bearer bcms_YOUR_KEY"
200 Copy {
"categories": [
{
"id": "665f…",
"name": "Engineering",
"slug": "engineering",
"description": ""
}
]
}
Errors 401 — missing or invalid API key.400 — invalid parameters (the error message says which).404 — resource not found on this blog.Errors are JSON: `{ "error": "…" }`. All endpoints send permissive CORS headers, so browser apps can call them directly.