Documents¶
How content gets into Renbase, what happens to it, and how to keep it current.
Uploading¶
curl -X POST $RENBASE_API/v1/documents \
-H "Authorization: Bearer $RENBASE_KEY" \
-F file=@handbook.pdf \
-F collection=support \
-F 'meta={"lang":"en","category":"policies"}'
Supported formats: PDF, DOCX, PPTX, XLSX, HTML, Markdown and plain text. Scanned PDFs are read with text recognition; digital PDFs are read directly from their text layer, which is more faithful.
The call returns a job right away instead of holding the connection open:
Add ?wait=30 if you'd rather block until processing finishes or the timeout elapses — convenient in scripts, not recommended for large files.
Metadata¶
The meta field attaches key-value pairs to the document. They're useful later as filters when asking questions:
Filters combine with AND across keys and OR within a key's values, matching exactly.
Tracking progress¶
A job moves through pending → running → done, with a stage describing what it's doing (queued, fetching, parsing, chunking, indexing).
For a live view — a progress bar in your own UI, for instance — subscribe to the event stream instead of polling:
If a job fails, it carries a short reason. An admin can requeue it without uploading the file again:
That window isn't indefinite: the uploaded bytes are kept for seven days after processing, and past that a retry means uploading the file again.
Listing and inspecting¶
# Paginated list, filterable by collection and free text
curl "$RENBASE_API/v1/documents?collection=support&q=refund" \
-H "Authorization: Bearer $RENBASE_KEY"
# One document, with its size, collection and chunk count
curl $RENBASE_API/v1/documents/{id} -H "Authorization: Bearer $RENBASE_KEY"
# How it was split for retrieval — useful when an answer misses something
curl $RENBASE_API/v1/documents/{id}/chunks -H "Authorization: Bearer $RENBASE_KEY"
Looking at the chunks is the fastest way to diagnose a disappointing answer: if the relevant passage was split badly or a table lost its header, you'll see it immediately.
Updating and removing¶
Re-uploading a file with the same content changes nothing — Renbase recognizes it and skips the work. Re-uploading modified content creates a new version and the old one stops being cited.
# Remove the document and take its content out of answers
curl -X DELETE $RENBASE_API/v1/documents/{id} -H "Authorization: Bearer $ADMIN_TOKEN"
# Rebuild its search entries without re-uploading
curl -X POST $RENBASE_API/v1/documents/{id}/reindex -H "Authorization: Bearer $ADMIN_TOKEN"
Reindexing rebuilds a document's entries from stored content. It does not re-read the original file, so it won't change how the document was split — for that, upload it again.
Collections¶
Returns each collection with its document count. Names starting with __ are reserved.
Limits¶
| Limit | Value |
|---|---|
| Maximum document size | 50 MB |
| Documents processing at once, per organization | 2 |
| Retention of uploaded bytes after processing | 7 days |
Uploads beyond the concurrency limit aren't rejected — they wait in the queue and start as the ones ahead finish.