Replace an existing file in a knowledge folder with a new version
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicKNOWLEDGE_FOLDER_API scope. The knowledge folder must be shared with the API key. See Share Knowledge Folders with the API for setup instructions.multipart/form-data requests with the file attached.
| Parameter | Type | Required | Description |
|---|---|---|---|
folderId | string | Yes | The ID of the knowledge folder |
| Field | Type | Required | Description |
|---|---|---|---|
attachmentId | string | Yes | The ID of the attachment to update |
file | file | Yes | The new file to upload (max 256MB) |
url | string | No | URL shown to users when this file is used in an answer |
syncStatus field indicates the current state:
UPLOADING - File is being uploadedUPLOADED - File is uploaded and queued for processingEXTRACTING - Text is being extracted from the fileEMBEDDING - Embeddings are being generatedSYNCED - File is ready for searchACTION_FAILED, EXTRACTION_FAILED, EMBEDDING_FAILED, TIMEOUT - Processing failedAPI key as Bearer token. Format "Bearer YOUR_API_KEY"
The ID of the knowledge folder
Attachment updated successfully