Before you start
- An Indexify business with Knowledge enabled. Create and verify your account, then explicitly create your business. As its administrator, open Settings › General and choose Activate Knowledge and create my key: your first knowledge key is shown once.
- Live documents. Upload documents or add web pages in the console, or through the API below, and make them Live. Only Live documents answer; a Draft answers nobody.
- curl and a shell. The examples keep each value they need in a variable as they go: your key, your business id, a collection id, and the ids of the documents you add. Set each from your own response; responses marked illustrative come from a fictional business.
Issue a knowledge key
- Sign in at app.indexify.ai as an administrator of your business.
- Open Settings › API keys and choose Issue a key.
- Name it after what will use it, for example “Website search”.
- Tick Read this business's knowledge to ask questions, list collections and read documents. Tick Change and delete this business's knowledge as well if the key will add documents.
- Copy the key. It is shown once: if it is lost, revoke it and issue another.
A key belongs to one business. It reaches that business's knowledge and nothing else, and it can never change your review settings or act for a person. Keep it on your server, never in a browser or an app.
export INDEXIFY_KEY="paste-your-knowledge-key-here"The knowledge API
Every request sends the key in an x-api-key header. Every path starts with https://api.indexify.ai/api/admin/knowledge, followed by your business id. Request and response bodies are JSON, except uploads, which are multipart forms.
Find your business id
The key knows its business; this asks which one.
curl -s https://api.indexify.ai/api/admin/knowledge/tenants \
-H "x-api-key: $INDEXIFY_KEY"[
{
"tenantId": "northwind-field-services",
"displayName": "Northwind Field Services",
"hasKnowledgeConnection": true,
"canAdminister": true,
"capabilities": { "files": true, "hitl": true, "testQuery": true, "fixtures": false }
}
]export INDEXIFY_BUSINESS="northwind-field-services"List collections
A collection is a group of documents, for example one per client or one per product. Queries name the collection they may answer from.
curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/kbs" \
-H "x-api-key: $INDEXIFY_KEY"{
"kbs": [
{
"id": "6716f2c4e1a9b3d2c4f5a611",
"name": "Service manuals",
"description": "Installation and servicing guides",
"createdAt": "2026-10-12T09:14:03.511Z",
"updatedAt": "2026-10-12T09:14:03.511Z"
}
]
}export INDEXIFY_COLLECTION="6716f2c4e1a9b3d2c4f5a611"Add a document
Adding needs a key that can change knowledge. Indexify accepts PDF, Word (.docx), Excel (.xlsx), CSV, plain text and JPEG files of up to 20 MB. publicationStatus=published makes the document Live as soon as it has been processed; leave it out to add a Draft and publish it in the console. knowledgeBaseIds takes one collection id or several, separated by commas. Run this from the folder that holds the file.
curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/files/upload" \
-H "x-api-key: $INDEXIFY_KEY" \
-F "file=@warranty-policy.pdf" \
-F "knowledgeBaseIds=$INDEXIFY_COLLECTION" \
-F "publicationStatus=published"{ "id": "6716f61be1a9b3d2c4f5a7c2" }export INDEXIFY_FILE="6716f61be1a9b3d2c4f5a7c2"To add a web page, send its address. Then put it in a collection with the id that comes back.
curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/urls" \
-H "x-api-key: $INDEXIFY_KEY" \
-H "content-type: application/json" \
-d '{"url": "https://www.example.com/", "publicationStatus": "published"}'{ "id": "6716f7d0e1a9b3d2c4f5a7e9", "status": "processing" }export INDEXIFY_PAGE="6716f7d0e1a9b3d2c4f5a7e9"curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/kbs/$INDEXIFY_COLLECTION/files" \
-H "x-api-key: $INDEXIFY_KEY" \
-H "content-type: application/json" \
-d "{\"fileIds\": [\"$INDEXIFY_PAGE\"]}"Check processing
Reading, enriching and indexing run in the background after the upload returns. status reads processing until the document is ready, then active; failed comes with an error.
curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/files/$INDEXIFY_FILE" \
-H "x-api-key: $INDEXIFY_KEY"{
"id": "6716f61be1a9b3d2c4f5a7c2",
"title": "warranty-policy.pdf",
"status": "active",
"publicationStatus": "published",
"summary": "Warranty terms for heat pumps and boilers installed by Northwind…",
"tags": ["warranty", "heat pumps"],
"questions": ["How long is the warranty on a new heat pump?"],
"error": null
}Ask a question
A question names its scope: a knowledgeBaseId, or a fileIds list. There is no business-wide default, so a query for one client can never be answered from another client's collection. Only Live documents answer.
curl -s "https://api.indexify.ai/api/admin/knowledge/$INDEXIFY_BUSINESS/query" \
-H "x-api-key: $INDEXIFY_KEY" \
-H "content-type: application/json" \
-d "{\"question\": \"How long is the warranty on a new heat pump?\", \"knowledgeBaseId\": \"$INDEXIFY_COLLECTION\"}"{
"id": "6716f9a0e1a9b3d2c4f5a8d4",
"question": "How long is the warranty on a new heat pump?",
"status": "COMPLETED",
"reviewStatus": "released",
"hitlEnabled": true,
"hitlConfidenceThreshold": 0.75,
"hitlPolicyVersion": null,
"answer": "Five years on parts and two years on labour, as long as the heat pump is serviced every year by an approved engineer.",
"resolutionOutcome": "resolved",
"pipelineOutcome": null,
"requiredContext": null,
"confidence": 91,
"confidenceThreshold": 75,
"sources": [
{
"fileId": "6716f61be1a9b3d2c4f5a7c2",
"fileName": "warranty-policy.pdf",
"text": "New heat pumps carry a five-year parts warranty and a two-year labour warranty, conditional on an annual service by an approved engineer.",
"score": 0.842,
"effectivePeriod": null
}
]
}When your documents have versions for different periods, add "targetDateIso": "2026-10-19" to ask as of that date. Each question, the scope it named and the answer are recorded for your business, and each counts as one interaction in pricing.
| Field | What it tells you |
|---|---|
answer | The answer, or null when nothing in the scope answers the question. |
sources | The passages the answer was built from, each with its file id, file name, text, retrieval score and, for a dated version, the period it covers. |
confidence | How sure the answer is, from 0 to 100, beside confidenceThreshold, the bar it had to clear. |
reviewStatus | released, or held-for-review when the answer fell below the bar or could not be checked: it then waits in the console under Needs a person, and is best treated as unconfirmed. |
resolutionOutcome | Why the answer reads as it does: resolved, or for example context_required when the question needs a date, with requiredContext saying what to add. |
pipelineOutcome | scope_empty when the scope held nothing that could answer, so an empty answer is not mistaken for a gap. |
Errors
A refusal says why. A 400 carries error, a token for your code, and message, a sentence for the person fixing it.
| Response | Meaning |
|---|---|
| 401 Unauthorized | The key is unknown or has been revoked. |
| 403 Forbidden | The key lacks the permission, for example a reading key adding a document, or the path names another business. |
scope_required | The question named neither a knowledgeBaseId nor fileIds. |
incomplete_scope | A scope was sent empty, such as "" or []. |
ambiguous_scope | Both a knowledgeBaseId and fileIds were sent; send one. |
malformed_scope_id | A collection or file id is not an id. |
drafts_not_available | includeDrafts was sent: the API answers from Live documents only. |
invalid_target_date | targetDateIso is not a real YYYY-MM-DD date; leave it out to ask with no date. |
MCP for Claude and Codex
The MCP address is https://mcp.indexify.ai/mcp. Each person connects once, signs in with their own Indexify account, and approves the access shown on a consent page. One connection reaches every business the person is a member of, now and later. The connection carries no access of its own: the person's membership supplies it, and is checked on every call. Connections made earlier at a business's own /t/<slug>/mcp address keep working for that one business.
Claude Code
claude mcp add --scope user --transport http indexify https://mcp.indexify.ai/mcp
claude mcp login indexify
claude mcp get indexifyThe sign-in opens in your browser. get should report Connected. Ask Claude to list your businesses, then to list a business's collections and search one by name.
Codex
codex mcp add indexify --url https://mcp.indexify.ai/mcpComplete the sign-in and consent if Codex opens them. If it does not, run codex mcp login indexify.
Claude.ai
In Customize › Connectors, choose Add custom connector and enter your MCP address. Leave the OAuth client ID and secret blank. Choose Connect, sign in and approve, then turn the connector on for the conversation. On Team and Enterprise plans, an owner adds the address under Organization settings › Connectors before members connect it.
The tools
| Tool | What it does |
|---|---|
list_businesses | Lists the businesses you are a member of, with each one’s business_id and name. |
list_collections | Lists your collections, with each one’s id, name, description, document count and last update. |
search | Returns ranked passages, with each document’s id and title, a snippet, its collections, dates and source page. Claude or Codex writes the answer from them. |
get_document | Returns one document’s full text, up to 50,000 characters. |
add_document | Files new text into a named collection and publishes it, so it becomes searchable once processed. |
Every tool after list_businesses takes the business_id it should work in, so Claude or Codex asks you which business you mean when more than one could fit. A connection approved for reading only is not given add_document. Every tool reaches only documents that are Live, enabled and unexpired, and only in the business named.