Update the categories assigned to a document.
This endpoint replaces all existing categories for a document with the new list provided. Use this to organize and tag documents for easier retrieval.
Args:
id: Document ID (path parameter)
req: Request body containing the new list of categories
Returns: None (204 No Content on success)
Raises:
HTTPException(404): If the document is not found or doesn’t belong to the user
Example: Request:
PUT /api/v3/documents/doc-xyz789/categories
Headers: {"Authorization": "Bearer <api_key>"}
Body:
{
"categories": ["financial", "2024-q1", "confidential"]
}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
List of categories to be assigned to the document
["customer_support", "products", "legal"]Successful Response