Knowledge Base
Upload, list, and delete knowledge base files for AI voice assistants via the Talkturo API — manage documents that power retrieval-based answers during calls.
curl --request GET \
--url "https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/knowledge-base" \
--cookie "sb-access-token=sb_example_session_token"
const response = await fetch(
"https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/knowledge-base",
{
method: "GET",
credentials: "include",
}
);
const data = await response.json();
console.log(data);
{
"success": true,
"files": [
{
"id": "6b9d58b9-4b43-4f94-8cb8-2d3d9f18d714",
"filename": "acme-pricing-guide.pdf",
"size": 248193,
"type": "application/pdf",
"status": "processed",
"created_at": "2026-02-11T14:22:09.000Z"
},
{
"id": "4f6c291e-a60d-4ff3-9cb2-52e2b65f6b31",
"filename": "returns-policy.docx",
"size": 91344,
"type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"status": "processing",
"created_at": "2026-02-11T14:24:51.000Z"
}
]
}
curl --request POST \
--url "https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/knowledge-base" \
--cookie "sb-access-token=sb_example_session_token" \
--form "file=@./docs/acme-support-playbook.pdf"
const formData = new FormData();
formData.append("file", fileInput.files[0]);
const response = await fetch(
"https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/knowledge-base",
{
method: "POST",
body: formData,
credentials: "include",
}
);
const data = await response.json();
console.log(data);
{
"success": true,
"file": {
"id": "6b9d58b9-4b43-4f94-8cb8-2d3d9f18d714",
"filename": "acme-support-playbook.pdf",
"size": 248193,
"type": "application/pdf",
"status": "processing",
"created_at": "2026-02-11T14:22:09.000Z"
}
}
Knowledge base endpoints
Manage assistant-specific knowledge base files with session-authenticated endpoints under /api/assistants/{assistantId}/knowledge-base. Uploaded files are stored per assistant and processed for retrieval during calls.
These endpoints require an authenticated browser session. They do not use API key authentication.
Upload requests use multipart/form-data and must include a file field. File processing happens after upload, so a newly uploaded file may appear with a non-ready status before it becomes available for retrieval.
Endpoint summary
| Method | Path | Purpose | Auth |
|---|---|---|---|
GET | /api/assistants/{assistantId}/knowledge-base | List knowledge base files for an assistant | Session cookie |
POST | /api/assistants/{assistantId}/knowledge-base | Upload a knowledge base file | Session cookie |
DELETE | /api/assistants/{assistantId}/knowledge-base/{fileId} | Delete a knowledge base file | Session cookie |
GET | /api/assistants/{assistantId}/billing/estimate | Get knowledge base processing cost estimate | Session cookie |
GET | /api/kb | Standalone knowledge base query endpoint, if enabled in your deployment | Check your deployment |
List knowledge base files
Return all knowledge base files attached to an assistant.
Path parameters
Assistant identifier. The returned file list is scoped to this assistant.
Response fields
Returns true when the request succeeds.
List of knowledge base files attached to the assistant.
Unique file identifier. Use this value when deleting a file.
Original uploaded filename.
File size in bytes.
Detected file MIME type.
Processing state for the file. Use this field to determine whether the file is still being processed or is ready for retrieval use.
Timestamp when the file was uploaded.
Upload a knowledge base file
Upload a file to an assistant's knowledge base with multipart/form-data.
A successful upload confirms the file was accepted and queued for processing. Check the file status from the list endpoint if your workflow needs to wait until processing finishes.
Path parameters
Assistant identifier that will own the uploaded file.
Body parameters
The file to upload, sent as a multipart/form-data field.
Response fields
Returns true when the upload is accepted.
Metadata for the uploaded file.
Unique file identifier.
Original uploaded filename.
File size in bytes.
Detected file MIME type.
Initial processing state after upload.
Timestamp when the file was created.
Delete a knowledge base file
Remove a file from an assistant's knowledge base.
curl --request DELETE \
--url "https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/knowledge-base/6b9d58b9-4b43-4f94-8cb8-2d3d9f18d714" \
--cookie "sb-access-token=sb_example_session_token"
{
"success": true,
"message": "File deleted"
}
Path parameters
Assistant identifier that owns the file.
Knowledge base file identifier to delete.
Response fields
Returns true when the file is removed.
Human-readable deletion result.
Get billing estimate
Retrieve the billing estimate for knowledge base processing for an assistant.
curl --request GET \
--url "https://app.talkturo.com/api/assistants/9d3f6cf5-3c12-4e60-bd8a-1b1d57a8c4d2/billing/estimate" \
--cookie "sb-access-token=sb_example_session_token"
The response returns a success flag and an estimate object.
Path parameters
Assistant identifier used to calculate the estimate.
Response fields
Returns true when the estimate is available.
Billing estimate details for knowledge base processing. The object shape depends on the current billing implementation.
Standalone knowledge base endpoint
Some deployments may expose a separate GET /api/kb endpoint for standalone knowledge base queries.
The repository context for this page confirms assistant-scoped knowledge base management endpoints. It does not provide a verified request or response schema for GET /api/kb. Check your deployed API or internal route definitions before relying on this endpoint in production.
If GET /api/kb exists in your environment, treat it as separate from assistant file management. It is not a replacement for the upload, list, or delete endpoints documented above.
Typical workflow
Use the knowledge base endpoints in this order when automating document management:
Upload the file
Send a POST request with multipart/form-data to the assistant knowledge base endpoint.
Success looks like a response with success: true and a file object.
Poll for processing status
Call GET /api/assistants/{assistantId}/knowledge-base and inspect each file's status.
Your workflow can continue once the uploaded file appears in the list and its status indicates processing is complete.
Estimate processing cost when needed
Call GET /api/assistants/{assistantId}/billing/estimate before or after upload if you need billing visibility for the assistant's knowledge base usage.
Success looks like a response with success: true and an estimate object.
Remove outdated files
Delete files you no longer want the assistant to use by sending DELETE /api/assistants/{assistantId}/knowledge-base/{fileId}.
A successful deletion returns success: true and a confirmation message.