Create Blog Post
Creates a blog post for writer/admin roles. When CPT is enabled, send post_type and custom_fields. Approval/scheduling/password behaviors may apply.
Authorizations
Session ID for authenticated requests
Request Body
Responses
Post created
Create a new blog post.
Auth: session + writer role.
Body
- title
- slug
- body
- body_format
- visibility
lang— ISO 639-1 code, for example"lang": "es". Omitted means the default language. See Languages.post_type(CPT)custom_fields(CPT)
Parameters
None.
Request Body
{
"title": "Why modular docs matter",
"slug": "why-modular-docs-matter",
"body": "# Why modular docs matter",
"body_format": "markdown",
"visibility": "public",
"lang": "es",
"post_type": "case-study",
"custom_fields": { "client": "Acme" }
}Response 200
{
"data": {
"id": "post_2",
"slug": "why-modular-docs-matter",
"status": "draft",
"post_type": "case-study",
"custom_fields": { "client": "Acme" }
},
"user_context": { "authenticated": true, "user_type": "writer" },
"meta": { "cached": false }
}Response Errors
400invalid post payload (CUSTOM_FIELDS_*,MAX_PER_AUTHOR, …)401missing session403missing writer role orAPPROVAL_REQUIREDon publish503Blog / related module disabled429RATE_LIMIT_EXCEEDED
Notes
Rate limit:
postbucket, 10 requests / 3600s by default. A session that can publish (admin,superadmin,author,editor, or the roles inBLOG_ALLOWED_POST_ROLESandBLOG_ADMIN_ROLES) is not counted. Otherwise429RATE_LIMIT_EXCEEDED. See Rate limits.Use this when creating draft content.
Supports optional comments, reactions, excerpt, and scheduling fields.
When CPT is enabled, send
post_type(defaults fromPOST_TYPES_DEFAULT_TYPE) andcustom_fieldsvalidated against the typefield_schema.post_typeis locked after create. Behaviors may enforce approval, scheduling, password visibility, andmax_per_author.