Skip to main content
PUT
/
api
/
v3
/
documents
/
{id}
/
categories
Update Document Categories
curl --request PUT \
  --url https://api.nugen.in/api/v3/documents/{id}/categories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "categories": [
    "customer_support",
    "products",
    "legal"
  ]
}
'
{
  "document_id": "doc-abc123",
  "old_categories": [
    "customer_service",
    "ML_book_new"
  ],
  "new_categories": [
    "customer_support",
    "products",
    "legal"
  ],
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
categories
string[]
required

List of categories to be assigned to the document

Example:
["customer_support", "products", "legal"]

Response

Successful Response

document_id
string
required

ID of the updated document

Example:

"doc-abc123"

old_categories
string[]
required

Categories before the update

Example:
["customer_service", "ML_book_new"]
new_categories
string[]
required

Categories after the update

Example:
["customer_support", "products", "legal"]
message
string
required

Human-readable confirmation message