Full REST API
AI agents & LLMs: read this documentation as Markdown at nextblog.ai/docs/api-v1.md or browse the per-section Markdown index.
https://nextblog.ai/api/v1 is the complete public API: every dashboard action, implemented once in the same service layer as the MCP server. JSON in, JSON out.Base URL: https://nextblog.ai/api/v1
OpenAPI 3.1: https://nextblog.ai/api/v1/openapi.jsonThe OpenAPI document is public, CORS-enabled and needs no authentication. The older
/api/blog and /api/manage bases keep working as legacy aliases (see Blog Display API and Post Management API).Authentication
- Account API key —
Authorization: Bearer nb_u_...; every project the account owns, with an optional read-only mode that refuses every write with403 READ_ONLY_KEY. Created at /agents, shown once. - OAuth access token — whole account, including project create/delete and account key management.
- Project API key (legacy) —
Authorization: Bearer nb_...; one project, its posts, integrations, connections and analytics. - Account-level calls over a project key return
403 ACCOUNT_SCOPE_REQUIRED; use an account key or OAuth. Billing URLs are allowed for all three.
curl -H "Authorization: Bearer nb_u_your_account_api_key" \
https://nextblog.ai/api/v1/meErrors
Every failure uses
{ error: { code, message, details? } }:AUTH_REQUIRED401 ·INVALID_API_KEY401FORBIDDEN403 ·PROJECT_SCOPE_VIOLATION403 ·ACCOUNT_SCOPE_REQUIRED403 ·READ_ONLY_KEY403 ·UPGRADE_REQUIRED403NOT_FOUND404 ·METHOD_NOT_ALLOWED405 ·CONFLICT409VALIDATION_ERROR400/413 ·INSUFFICIENT_CREDITS402 ·RATE_LIMITED429PROVIDER_NOT_CONFIGURED503 ·UPSTREAM_ERROR502 ·INTERNAL_ERROR500CONFIRMATION_REQUIREDexists only on MCP; an HTTP call is its own confirmation
Pagination, limits and idempotency
limitdefault 50, max 100;offsetdefault 0; post lists also returntotal- 120 requests/minute and 1,000/hour per credential; generation and video 10/hour; billing links 20/hour
- 429 carries
Retry-AfterandX-RateLimit-* Idempotency-Keyon any POST/PATCH/DELETE replays the first 2xx for 24 hours (X-Idempotent-Replay: true); a different action with the same key is 409- 200 KB markdown, 200-character title, 500-character description, 200 KB JSON body
Endpoints
Examples
# List posts (account key)
curl -H "Authorization: Bearer nb_u_your_account_api_key" \
"https://nextblog.ai/api/v1/projects/123/posts?limit=10"
# Create a draft
curl -X POST https://nextblog.ai/api/v1/projects/123/posts \
-H "Authorization: Bearer nb_u_your_account_api_key" \
-H "Content-Type: application/json" \
-d '{"title":"My post","markdown":"# Hello","status":"draft"}'
# Create a project (account key or OAuth)
curl -X POST https://nextblog.ai/api/v1/projects \
-H "Authorization: Bearer nb_u_your_account_api_key" \
-H "Content-Type: application/json" \
-d '{"name":"My site","url":"https://example.com","extract":true}'
# A legacy project key works in the same examples for its one projectCanonical Markdown: /docs/api-v1.md. Machine-readable: /api/v1/openapi.json.