Skip to main content
PATCH
/
knowledge
/
{folderId}
Update a file in a knowledge folder
curl --request PATCH \
  --url https://api.langdock.com/knowledge/{folderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'url=<string>' \
  --form 'attachmentId=<string>'
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Headers

Authorization
string
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Path Parameters

folderId
string
required

The ID of the knowledge folder

Body

multipart/form-data
file
file

The new file to upload

url
string

URL that is shown to the user if the file is used in an answer

attachmentId
string

The ID of the attachment to update

Response

200

Attachment updated successfully