Skip to main content
PATCH
/
api
/
v3
/
documents
/
categories
/
edit
Edit Category Name
curl --request PATCH \
  --url https://api.nugen.in/api/v3/documents/categories/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "old_name": "customer_support",
  "new_name": "customer_service"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for editing category name

old_name
string
required

Current category name

Example:

"customer_support"

new_name
string
required

New category name

Example:

"customer_service"

Response

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.