Delete a file from a knowledge folder
Knowledge Folder API
Delete Attachment from Knowledge Folder
Remove a file from a knowledge folder
DELETE
Delete a file from a knowledge folder
Documentation Index
Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
Use this file to discover all available pages before exploring further.
Using our API via a dedicated deployment? Just replace
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicRequires an API key with the
KNOWLEDGE_FOLDER_API scope. The knowledge folder must be shared with the API key. See Share Knowledge Folders with the API for setup instructions.Request Format
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
folderId | string | Yes | The ID of the knowledge folder |
attachmentId | string | Yes | The ID of the attachment to delete |
Examples
Delete with cURL
Delete with JavaScript
Bulk Delete Example
Response Format
Success Response (200 OK)
Example Response
Error Handling
Important Notes
- The attachment must belong to the specified knowledge folder
- The knowledge folder must be shared with your API key
- Deleting an attachment removes it from search results immediately
- Embeddings associated with the attachment are also deleted
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.