{
"name": "Tech & Innovation",
"description": "Updated description for technology articles"
}
{
"message": "Category updated successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Tech & Innovation",
"slug": "tech-innovation",
"description": "Updated description for technology articles",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
Update an existing category
{
"name": "Tech & Innovation",
"description": "Updated description for technology articles"
}
{
"message": "Category updated successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Tech & Innovation",
"slug": "tech-innovation",
"description": "Updated description for technology articles",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
Updates an existing category’s details. 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": "Tech & Innovation",
"description": "Updated description for technology articles"
}
{
"message": "Category updated successfully",
"category": {
"_id": "507f1f77bcf86cd799439011",
"name": "Tech & Innovation",
"slug": "tech-innovation",
"description": "Updated description for technology articles",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
{
"error": "Category not found"
}
{
"error": "No token provided"
}
{
"error": "Admin access required"
}
{
"error": "Database connection failed"
}
curl -X PUT https://api.vaniyk-empire.com/api/categories/507f1f77bcf86cd799439011 \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Tech & Innovation",
"description": "Updated description for technology articles"
}'
name, the slug will be automatically regeneratedcategoryId parameter must be a valid MongoDB ObjectId