Post Management API
AI agents & LLMs: read this documentation as Markdown at nextblog.ai/docs/api-manage-posts.md or browse the per-section Markdown index.
Legacy alias
These endpoints keep working unchanged, but new integrations should use the Full REST API:
GET/POST /api/v1/projects/{projectId}/posts, GET/PATCH/DELETE .../posts/{postId}, plus approve, decline and unpublish.Optional, advanced API for creating and editing posts, changing status, and listing drafts or declined posts. Most users manage content in the NextBlog dashboard; use this when you need full control from your own backend.
Use the same project API key as the display API:
Authorization: Bearer your_api_key. For embedding published posts on a website, prefer the Blog Display API (/api/blog/...).Base URL
https://nextblog.ai/api/manageStatus values
draft— not shown on the public Blog Display API; editable.approvedwithpublished: true— included in the Blog Display API.declined— not shown on the Blog Display API.
When
status is approved (or you publish via published: true), a non-empty slug is required. Setting status or publishing through this API updates your NextBlog project data; it does not run the same external CMS publish steps as approving from the dashboard (e.g. WordPress sync). Use the dashboard for integrations that push to third-party platforms.Endpoints
List all posts (including drafts)
Endpoint:
GET /api/manage/{projectId}/postsQuery (optional):
status (draft, approved, declined), published (true / false), limit.Example:
curl -H "Authorization: Bearer your_api_key_here" \
"https://nextblog.ai/api/manage/project_123/posts?status=draft"Create a post
Endpoint:
POST /api/manage/{projectId}/postsBody (JSON): required
title, markdown. Optional: slug, description, cover_image_url, cover_image_alt, published, status. New posts default to draft unless you set status or published.curl -X POST -H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"My post","markdown":"# Hello","status":"draft"}' \
https://nextblog.ai/api/manage/project_123/postsGet one post by ID
Endpoint:
GET /api/manage/{projectId}/posts/{postId}Returns full fields including
markdown for drafts and declined posts.curl -H "Authorization: Bearer your_api_key_here" \
https://nextblog.ai/api/manage/project_123/posts/blog_uuidUpdate a post (content or status)
Endpoint:
PATCH /api/manage/{projectId}/posts/{postId}Body (JSON): any of
title, markdown, slug, description, cover_image_url, cover_image_alt, published, status. Send only fields you want to change.curl -X PATCH -H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"status":"approved","slug":"my-post-slug"}' \
https://nextblog.ai/api/manage/project_123/posts/blog_uuidErrors
- 400 — validation (e.g. missing slug when approving)
- 401 — missing or invalid API key
- 404 — post not found or not in this project
- 409 — duplicate slug (when applicable)
- 500 — server error