Update a file in a knowledge folder

PATCH /knowledge/{folderId}

cURL

cURL
curl --request PATCH \
  --url https://api.langdock.com/knowledge/{folderId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'url=<string>' \
  --form 'attachmentId=<string>'

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

chevron-rightWas this page helpful?hashtag

Yes / No

Related:

  • https://docs.langdock.com/api-endpoints/knowledge-folder/upload-file

  • https://docs.langdock.com/api-endpoints/knowledge-folder/retrieve-files