Create Blog Post
POST
/api/v1/posts
Creates a blog post for writer/admin roles.
Authorizations
SessionAuth
Session ID for authenticated requests
Type
API Key (header: X-Session-ID)
Request Body
application/json
JSON "title": "string", "slug": "string", "body": "string", "body_format": "string", "excerpt": "string", "featured_image": "string", "status": "string", "visibility": "string", "password": "string", "category_ids": [ "string" ], "tag_ids": [ "string" ], "comments_enabled": true, "reactions_enabled": true, "scheduled_at": "string", "metadata": { "additionalProperties": "string" }
{
}
Responses
Post created
Create a new blog post.
Auth: session + writer role.
Body
- title
- slug
- body
- body_format
- visibility
Parameters
None.
Request Body
json
{
"title": "Why modular docs matter",
"slug": "why-modular-docs-matter",
"body": "# Why modular docs matter",
"body_format": "markdown",
"visibility": "public"
}Response 200
json
{
"data": { "id": "post_2", "slug": "why-modular-docs-matter", "status": "draft" },
"user_context": { "authenticated": true, "user_type": "writer" },
"meta": { "cached": false }
}Response Errors
400invalid post payload401missing session403missing writer role
Notes
- Use this when creating draft content.
- Supports optional comments, reactions, excerpt, and scheduling fields.