Rename a category across all documents.
This endpoint renames a category for all documents that currently have it assigned. Useful for fixing typos or reorganizing your document categorization system without manually updating each document.
Args:
req: Request body containing old and new category names
Returns: None (204 No Content on success)
Raises:
HTTPException(400): If the old category doesn’t exist or new name is invalid
HTTPException(400): If the new category name already exists
Example: Request:
PATCH /api/v3/documents/categories/edit
Headers: {"Authorization": "Bearer <api_key>"}
Body:
{
"old_name": "finacial",
"new_name": "financial"
}
Response: 204 No Content
Note: This operation affects all documents with the old category name, updating them to use the new category name.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Returns the updated category across all documents. This endpoint updates the name of an existing category for all documents that have it assigned, allowing you to fix typos or reorganize your categorization system without manually updating each document.