Delete Category
Categories
Delete Category
Delete a category
DELETE
Delete Category
Permanently deletes a category from the system. This endpoint requires admin authentication.
This operation is irreversible. Make sure you want to permanently delete the category before proceeding.
Request
Path Parameters
The unique MongoDB ObjectId of the category to delete
Headers
Bearer token with admin privilegesExample:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Response
Success message confirming the deletion
Error Responses
Error message describing what went wrong
404 - Category Not Found
Returned when no category exists with the specified ID.401 - Unauthorized
Returned when the authentication token is missing or invalid.403 - Forbidden
Returned when the authenticated user is not an admin.500 - Internal Server Error
Example Request
Notes
- The deletion is permanent and cannot be undone
- The
categoryIdparameter must be a valid MongoDB ObjectId - Consider the impact on any content (articles, posts, etc.) that may be associated with this category before deletion