Overview
Upload prepared documents to a knowledge folder, then check that processing completes and the expected passages can be retrieved.
Use the upload checklist before and after making changes.
Upload process
Uploading a document takes three requests: ask Anam for a presigned URL, send the file straight to storage, then confirm the upload so processing can start. This is the recommended route for every file, because the second request goes directly to cloud storage and so is not bound by the 4.5MB request body limit that applies to the API itself. A single multipart request toPOST /v1/knowledge/groups/{id}/documents also works and is simpler for small files, but it is subject to that limit.
See upload limits for file size and monthly allowance.
1
Request presigned URL
Request an upload URL from Anam:Response:
2
Upload to presigned URL
Upload the file directly to cloud storage:
This step uploads directly to cloud storage, bypassing Anam’s API servers for better performance with large files.
3
Confirm upload
Notify Anam that the upload is complete:
The response returns the document with status
PROCESSING. Indexing then runs in the background, so a successful confirmation does not mean the document is searchable yet — poll its status until it reaches READY.The three requests as one function
The batch example below reusesuploadLargeDocument from here.
Complete upload helper
Complete upload helper
Show upload progress
The direct-to-storage request is the slow part, so track progress there withXMLHttpRequest if you need a progress bar. This replaces step 2 only — request the presigned URL and confirm the upload as above.
Upload with progress tracking
Upload with progress tracking
Monitoring upload progress
After uploading, monitor the document’s processing status:UPLOADED: File uploaded, waiting for processingPROCESSING: Content is being extracted and indexedREADY: Document is searchableFAILED: Processing failed (checkerrorMessage)
READY documents are returned by search. A document that stays in PROCESSING for more than 15 minutes is marked FAILED by a periodic sweep, so a status change can take up to roughly 25 minutes to appear. Poll for longer than that before treating a document as stuck: your own polling loop giving up is not the same as the server failing the document.
Batch uploads
Upload multiple documents efficiently:READY before running retrieval tests against the folder.
Replace an existing document
To change a document’s contents, upload the revised file as a new document and remove the superseded document. The update document API only renames a file; it does not replace its contents or extracted passages. Track document IDs rather than assuming a matching filename identifies the active revision.1
Prepare and record the replacement
Open the exact file you intend to upload and check a distinctive changed passage. Record the source revision, effective date, target folder, and old document ID. Preserve the original file and relevant persona settings outside the active knowledge folders so you can roll back.
2
Upload and check processing
Use the upload process above, record the new document ID, and wait for it to reach
READY. Uploading a second file does not retire the first.If conflicting revisions must not be searchable during the update, prepare a separate replacement folder containing the complete intended document set. Test it before changing the folders selected by the knowledge tool.3
Retire the old version
For an update in the same folder, delete the superseded document after the replacement is ready. Check the folder’s document list using the IDs you recorded.For a replacement folder, update the tool’s selected folders to use it and remove the old folder from that selection. Check other tools attached to the persona for references to the old material too.
4
Verify retrieval and a fresh conversation
Search for the changed fact and inspect its text, scope, and source document ID. Confirm that superseded IDs no longer appear in results from the selected folders.Start a fresh persona session and test its answer. If an old rule still appears, check the selected files, active IDs, and processing status before editing the prompt.
Troubleshooting
File too large
File too large
Error:
File size exceeds limitSolutions:- Split the document at useful topic boundaries, keeping conditions and exceptions together
- Compress images while preserving essential text and diagrams
- Remove unnecessary pages only after checking for unique facts, qualifications, and source references
- Contact us about Enterprise plans with higher file size limits
Monthly upload quota exceeded
Monthly upload quota exceeded
Error:
Monthly upload quota exceededYour plan allows a fixed number of megabytes uploaded per calendar month. The response states how much of the allowance is left.Solutions:- Upload only the files the persona needs, so the allowance is not spent on drafts or duplicates
- Wait for the allowance to reset at the start of next month
- Contact us about Enterprise plans with higher upload limits
Upload fails immediately
Upload fails immediately
Possible causes:
- Invalid API key
- Invalid folder ID
- Unsupported file type
- Verify API key is valid and has proper permissions
- Confirm folder ID exists:
GET /v1/knowledge/groups - Check the file is a supported type and that the filename is 255 characters or fewer
- Review error message in response
Processing stuck
Processing stuck
Status remains PROCESSINGPossible causes:
- Very large file (40-50MB)
- Complex PDF with many images
- Service temporarily slow
- Keep polling. A document is only considered stuck after 15 minutes in
PROCESSING, and the sweep that marks itFAILEDruns every 10 minutes, so allow roughly 25 minutes before concluding anything. - Once the status is
FAILED, readerrorMessagefor the reason. - Upload the file again as a new document if it failed, then delete the failed one.
- Contact support if the same file fails repeatedly.
Processing failed
Processing failed
Status changes to FAILEDCommon causes:
- Corrupted file
- Encrypted or password-protected PDF
- Invalid file format despite correct extension
- File contains only images (no text)
- Check error message in document details
- Verify file opens correctly on your computer
- Remove password protection from PDFs
- Ensure PDFs contain extractable text (not just images)
- Try converting to a different supported format
Presigned URL expires
Presigned URL expires
Error when uploading to presigned URLSolutions:
- Presigned URLs expire after 1 hour
- Request a new presigned URL if expired
- Upload the file immediately after receiving the URL
Next steps
Test the retrieved passages and persona answers, then complete the upload checklist.Connect knowledge tools
Enable semantic search with knowledge tools
Set up your knowledge base
Organize documents with folders
Single-request upload
The multipart alternative to the presigned flow, for small files
Knowledge overview
Learn how RAG works

