ResourcesKnowledge Base

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"
{
  "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"
{
  "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

MethodPathPurposeAuth
GET/api/assistants/{assistantId}/knowledge-baseList knowledge base files for an assistantSession cookie
POST/api/assistants/{assistantId}/knowledge-baseUpload a knowledge base fileSession cookie
DELETE/api/assistants/{assistantId}/knowledge-base/{fileId}Delete a knowledge base fileSession cookie
GET/api/assistants/{assistantId}/billing/estimateGet knowledge base processing cost estimateSession cookie
GET/api/kbStandalone knowledge base query endpoint, if enabled in your deploymentCheck your deployment

List knowledge base files

Return all knowledge base files attached to an assistant.

Path parameters

path
assistantIduuid
Required

Assistant identifier. The returned file list is scoped to this assistant.

Response fields

successboolean
Required

Returns true when the request succeeds.

filesarray
Required

List of knowledge base files attached to the assistant.

files[].iduuid
Required

Unique file identifier. Use this value when deleting a file.

files[].filenamestring
Required

Original uploaded filename.

files[].sizenumber
Required

File size in bytes.

files[].typestring
Required

Detected file MIME type.

files[].statusstring
Required

Processing state for the file. Use this field to determine whether the file is still being processed or is ready for retrieval use.

files[].created_atstring
Required

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

path
assistantIduuid
Required

Assistant identifier that will own the uploaded file.

Body parameters

body
filebinary
Required

The file to upload, sent as a multipart/form-data field.

Response fields

successboolean
Required

Returns true when the upload is accepted.

fileobject
Required

Metadata for the uploaded file.

file.iduuid
Required

Unique file identifier.

file.filenamestring
Required

Original uploaded filename.

file.sizenumber
Required

File size in bytes.

file.typestring
Required

Detected file MIME type.

file.statusstring
Required

Initial processing state after upload.

file.created_atstring
Required

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

path
assistantIduuid
Required

Assistant identifier that owns the file.

path
fileIduuid
Required

Knowledge base file identifier to delete.

Response fields

successboolean
Required

Returns true when the file is removed.

messagestring
Required

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

path
assistantIduuid
Required

Assistant identifier used to calculate the estimate.

Response fields

successboolean
Required

Returns true when the estimate is available.

estimateobject
Required

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.