{
"name": "Technology",
"description": "Articles about technology and innovation"
}
{
"message": "Category created successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Technology",
"slug": "technology",
"description": "Articles about technology and innovation",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
Create a new category
{
"name": "Technology",
"description": "Articles about technology and innovation"
}
{
"message": "Category created successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Technology",
"slug": "technology",
"description": "Articles about technology and innovation",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
Creates a new category in the system. This endpoint requires admin authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PhemiT/vaniykeempire-api/llms.txt
Use this file to discover all available pages before exploring further.
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...application/json{
"name": "Technology",
"description": "Articles about technology and innovation"
}
{
"message": "Category created successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Technology",
"slug": "technology",
"description": "Articles about technology and innovation",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
{
"error": "Category already exists"
}
{
"error": "No token provided"
}
{
"error": "Admin access required"
}
{
"error": "Database connection failed"
}
curl -X POST https://api.vaniyk-empire.com/api/categories \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Technology",
"description": "Articles about technology and innovation"
}'
slug field is automatically generated from the name field by converting to lowercase and replacing spaces/special characters with hyphens