POST
https://app.evoriqa.com/api/v1/chatbots/{chatbotId}/sources/fileUpload a file source
Uploads a document as multipart/form-data. Allowed extensions: `pdf`, `docx`, `txt`, `md`, `csv` (415 otherwise). The file is virus-scanned and capped at the plan's file size (413 over it).
Requires scope knowledge:write
Warning:
Access is gated — enable it before your first call
The API is off by default. A request succeeds only when all three switches are on: the platform master switch (off by default), your organisation’s API toggle, and your plan or client entitlement. Any one off returns 403 API access is not enabled for this workspace.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| chatbotId | path | string uuid | Required | — | The chatbot the source belongs to. |
Request body
Content type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| file | string | Required | The document to ingest. |
Request
curl
curl -X POST "https://app.evoriqa.com/api/v1/chatbots/{chatbotId}/sources/file" \
-H "x-api-key: $EVORIQA_API_KEY" \
-F "file=@document.pdf"Node.js
import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("document.pdf"), "document.pdf");
const res = await fetch("https://app.evoriqa.com/api/v1/chatbots/{chatbotId}/sources/file", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVORIQA_API_KEY}`,
},
body: form,
});
const responseBody = await res.json();Python
import os
import requests
with open("document.pdf", "rb") as f:
res = requests.post(
"https://app.evoriqa.com/api/v1/chatbots/{chatbotId}/sources/file",
headers={"Authorization": f"Bearer {os.environ['EVORIQA_API_KEY']}"},
files={"file": f},
)
body = res.json()Response
200 OK
{
"success": true,
"data": {
"id": "0d9c2f11-6a8e-4d02-9f7b-1c3e5a7d9b20",
"chatbotId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"type": "file",
"title": "handbook.pdf",
"status": "pending",
"sourceUrl": null,
"errorMessage": null,
"processedAt": null,
"lastCrawledAt": "2026-08-01T10:14:40.000Z",
"recrawlIntervalHours": 168,
"createdAt": "2026-08-01T10:14:32.000Z"
}
}