Skip to main content
PUT
https://app.famulor.de
/
api
/
user
/
knowledgebases
/
{knowledgebaseId}
/
documents
/
{documentId}
Update Document
curl --request PUT \
  --url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "message": "Document updated successfully.",
  "data": {
    "id": 1,
    "name": "Updated Product Handbook",
    "description": "Revised user manual with new features",
    "type": "pdf",
    "type_label": "PDF",
    "status": "active",
    "status_label": "Active",
    "updated_at": "2025-01-08T15:45:00.000000Z"
  }
}
This endpoint updates the metadata of an existing document. You can only update the name and description - the document type and content cannot be changed.

Path Parameters

knowledgebaseId
integer
required
The unique identifier of the knowledge base
documentId
integer
required
The unique identifier of the document to update

Request Body

name
string
The new name for the document (max. 255 characters)
description
string
The new description for the document (max. 255 characters)

Response Fields

message
string
Success message
data
object
The updated document object
To update the content of a document, you must delete the existing document and create a new one with the updated content.
{
  "message": "Document updated successfully.",
  "data": {
    "id": 1,
    "name": "Updated Product Handbook",
    "description": "Revised user manual with new features",
    "type": "pdf",
    "type_label": "PDF",
    "status": "active",
    "status_label": "Active",
    "updated_at": "2025-01-08T15:45:00.000000Z"
  }
}