Data Lifecycle and Privacy
What happens to your documents from upload to deletion: how to take them out, how deletion works, when the platform deletes data on its own, and what is — and is not — stored about your searches.
Export a knowledge base
POST /v1/knowledge_bases/{kb_id}/exports starts an asynchronous export (portal: Export → Download all). It needs knowledge:write (portal: admins and owners) and is free of charge.
The zip contains:
documents/<document_id>/<original file name> one folder per document, original bytes
metadata.json array of Document objects (without failure details)
| Export status | Meaning |
|---|---|
queued | Waiting to start |
running | Being prepared |
ready | download_url is set: a signed link valid for 24 hours (expires_at) |
failed | failure explains why |
expired | The 24 hours have passed, or a document of the knowledge base was deleted or replaced after the export started (see below); the zip is deleted |
curl -X POST "https://api.infus.ai/v1/knowledge_bases/$KB_ID/exports" \
-H "Authorization: Bearer $API_KEY" -H "Idempotency-Key: export-hr-2026-09"
curl "https://api.infus.ai/v1/knowledge_bases/$KB_ID/exports/$EXPORT_ID" \
-H "Authorization: Bearer $API_KEY"
When the export is ready you also get a knowledge.export.ready webhook and a notification. The signed link works in a browser without an API key. If the request also carries a session or an API key, it must belong to the same organization, otherwise the answer is 404. After expires_at the link answers 410 Gone with code export_expired; start a new export. Every download is recorded in the audit log. Treat the link like a password — anyone holding it can download the zip until it expires.
Deleting or replacing a document expires the knowledge base's exports. An export zip must never hand out a document you deleted, so when a document is deleted (one at a time, in a batch, or with its website source) or a replacement file becomes the current version, every queued, running and ready export of that knowledge base becomes expired at once, in the same step as the deletion: from then on its link answers 410 export_expired, and the zip is removed by the regular export cleanup shortly after. Start a new export; it contains only the remaining documents. A download that had already started before the deletion may finish. A website page refreshed with new content by a sync does not expire exports.
Only one export per knowledge base can run at a time (409 export_in_progress, with details.export_id). Exports keep working while a knowledge base is frozen or suspended and during a payment suspension — export is always how your data leaves. Starting a new export is refused only during platform maintenance (503 maintenance_mode) and while knowledge bases are switched off on the platform (403 module_disabled); an export link you already have, and single originals, can still be downloaded in both cases.
You can also download a single original with GET …/documents/{document_id}/content (any member, knowledge:read).
Deleting documents and knowledge bases
DELETE /v1/knowledge_bases/{kb_id} and DELETE …/documents/{document_id} answer 202 Accepted; POST …/documents:batch_delete (up to 100 ids) answers 200 with a result per id. For every accepted deletion:
- Access closes immediately. The document or knowledge base disappears from lists, search results and chat citations, and its original can no longer be downloaded.
- Storage billing stops at acceptance, not when cleanup finishes.
- Physical cleanup runs asynchronously: search index entries, stored files and database rows are removed, each step recorded with a timestamp and a count, and a second independent pass verifies that nothing is left.
A request that retrieved sources just before a deletion is re-checked before its answer is built. Text already streamed to a client cannot be recalled.
Deletion is idempotent: deleting something already deleting answers 202 again. A knowledge.document.deleted webhook is sent for every deleted document.
Pages of a website source are documents too and are deleted the same way. Deleting a page's document also excludes the page, so later syncs do not bring it back (re-include it with reinclude_urls on the source). Deleting a source (DELETE …/sources/{source_id}) deletes all of its page documents through this process.
Closing your account
Closing your organization deletes all of its knowledge data through the same process and produces a deletion report: the numbers of knowledge bases, documents, versions, index entries and files removed, the time each step finished and the time a second pass verified that nothing remained. The report is the evidence of deletion for data-protection requests (for example under KVKK or GDPR); ask your platform operator for it. Export what you need first — outstanding invoices do not block a deletion, and invoice records are kept separately from content.
Backups
Backups age out on their own schedule. The last backup copy containing deleted data expires at the latest 30 days after the deletion started (for payment-related deletion, 30 days after D0 — see below). Backups are not offered as a way to restore deleted data.
Automatic retention schedules
The platform deletes data on its own in exactly two situations. Both send notifications at each step and keep download, export and delete open until the deletion day.
Payment problem
D0 is the moment paid knowledge work is stopped because of an unresolved payment problem. It is recorded once and is not reset by reminders or further failed payment attempts.
| Day | What happens |
|---|---|
| D0 | Paid work stops: uploads, searches and grounded chat are refused (402 payment_suspended) and knowledge bases become suspended. Download, export and delete stay open. No new pay-as-you-go storage charges accrue from D0. |
| D0–D7 | Recovery period. Settle the problem and everything resumes where it stopped. |
| D7 | Reminder that deletion is approaching. |
| D13 | Final warning. |
| D14 | Active data is deleted. |
| D30 | The last backup copy expires. |
A confirmed payment recovery before D14 cancels the deletion and reopens paid work. Once deletion has started it is not reversed. GET /v1/knowledge_usage → payment shows suspended_at and deletion_at. Reaching your own spending cap does not start this schedule — it only refuses new paid work until the cap is raised or the period ends.
Idle free-trial data
A free-trial knowledge base that has had no search and no upload for the idle period (30 days by default), while your organization cannot pay as it goes (prepaid with no positive balance, or stopped by a payment problem), is frozen:
| When | What happens |
|---|---|
| Idle period ends | The knowledge base becomes frozen (status_reason: trial_idle): search and upload are refused with 409 trial_kb_frozen; download, export and delete stay open. Frozen data is not billed. |
| Reminder day after freezing (default day 7) | Reminder. |
| One day before the deletion day (default day 13) | Final reminder: deletion tomorrow. |
| Deletion day after freezing (default day 14) | The knowledge base is deleted. |
The idle period, the reminder day and the deletion day are defaults: your platform operator can set other values for the platform or for your organization, and a change re-dates a schedule that is already running. The dates that apply to you are always in GET /v1/knowledge_usage → trial.deletion_at and in each knowledge base's deletion_scheduled_at — plan your export by those, not by the defaults.
Becoming able to pay as you go — no unresolved payment problem, and either a positive available prepaid balance or a postpaid account — unfreezes your knowledge bases immediately and stops the schedule. GET /v1/knowledge_usage → trial.frozen_at / trial.deletion_at and each knowledge base's deletion_scheduled_at show where you are.
In exceptional cases your platform operator can place a time-limited, audited hold that postpones the deletion step of either schedule (and the backup expiry by the same amount). A hold never reopens paid work, and D0 does not move.
Where your data is stored
- Original files, extracted text chunks and the search index are stored on the platform's own infrastructure, in the deployment you use. Extraction and embedding run on platform-hosted components; documents are not sent to third parties for indexing.
- When you chat with a knowledge base, the retrieved excerpts are sent to the chat model you choose, as part of its prompt. If that model is hosted by an external provider, the excerpts reach that provider.
- Content is isolated per organization at every layer: every lookup is scoped to your organization, and a knowledge base, document or export of another organization answers exactly like one that does not exist (
404 not_found).
What is stored about searches and chats
| Stored | Not stored |
|---|---|
| Per knowledge base and day: number of queries, number of queries with no result, average latency and an approximate 95th-percentile latency (the upper bound of the latency bucket that holds it), the most-cited document ids | The text of queries and questions |
| Feedback: the completion id, the rating, and the knowledge-base and cited document ids | The text of answers or of the sources shown |
| Usage records for billing (counts, tokens, bytes) | Query text in application logs, traces or metrics |
Read the numbers with GET /v1/knowledge_bases/{kb_id}/usage_summary?from=&to= (up to 90 days). Document content, queries and retrieval results are not written to application logs.
Platform operators see metadata only — knowledge-base and document counts, sizes, statuses, job states and retention phases. They do not see document text, originals or queries. Support access to content, when needed to resolve an issue, is granted per organization and knowledge base for at most 24 hours, with a recorded reason, and every read during that time is audited.
What the platform does not do
Be aware of these limits of version 1 before uploading sensitive material:
- No antivirus or malware scanning. Files pass structural checks only (type and signature, encryption, macros, archive size; active HTML and PDF content is dropped from the extracted text). The original file is stored and returned unchanged, so a harmful file uploaded by one of your users can be downloaded by your other users.
- No detection or redaction of personal data (PII/DLP). Whatever the files contain is indexed and can appear in search results and chat citations for everyone in your organization with access.
- No OCR. Scanned PDFs without a text layer are rejected (
no_text_content). - No per-user permissions inside an organization. Every member can read every knowledge base; limit API keys with their access list.
- Prompt injection cannot be fully prevented. See Chat with Citations.
You remain responsible for having the right to upload and process the documents, and for the personal data they contain.