Skip to content

Create Blog Category​

POST
/api/v1/posts/categories

Authorizations​

SessionAuth

Session ID for authenticated requests

Type
API Key (header: X-Session-ID)

Request Body​

application/json
JSON
{
  
"name": "string",
  
"slug": "string"
}

Responses​

Category created

Playground​

Server
Authorization
Body

Samples​

Powered by VitePress OpenAPI

Create a blog category.

Auth: session + admin.

Parameters ​

None.

Request Body ​

json
{
	"name": "Engineering",
	"slug": "engineering"
}

Response 200 ​

json
{
	"data": { "id": "cat_2", "name": "Engineering", "slug": "engineering" },
	"user_context": { "authenticated": true, "user_type": "admin" },
	"meta": {}
}

Response Errors ​

  • 400 invalid category payload
  • 401 missing session
  • 403 missing admin role
  • 429 RATE_LIMIT_EXCEEDED

Notes ​

  • Rate limit: post bucket, 10 requests / 3600s by default. A session that can publish (admin, superadmin, author, editor, or the roles in BLOG_ALLOWED_POST_ROLES and BLOG_ADMIN_ROLES) is not counted. Otherwise 429 RATE_LIMIT_EXCEEDED. See Rate limits.

  • Use this to add new taxonomy groups.

  • Category names should be unique and human-friendly.