POST

Add Text Source

Adds a free-text source to a knowledge base.

POSThttps://api.vantaxai.com/v1/knowledge-bases/{knowledgebase_id}/sources/text

Use a text source for unstructured content like policies, descriptions, or notes. The text is chunked and embedded automatically; the source begins in the `processing` state and becomes `ready` once indexing completes.

Headers

  • Authorizationstringrequired

    Bearer authentication with your secret API key.

    example: Bearer vx_live_3fa9c2…

  • Content-Typestringrequired

    Must be application/json for requests with a body.

    example: application/json

Path Parameters

  • knowledgebase_idstringrequired

    The knowledge base to add the source to.

    example: kb_71ac0

Body Parameters

  • titlestringrequired

    A label for the source.

    example: Cancellation Policy

  • contentstringrequired

    The raw text content to index.

Request

curl -X POST https://api.vantaxai.com/v1/knowledge-bases/kb_71ac0/sources/text \
  -H "Authorization: Bearer vx_live_3fa9c2..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Cancellation Policy",
    "content": "Appointments may be cancelled up to 24 hours in advance..."
  }'

Response

{
  "success": true,
  "message": "Source added successfully",
  "data": {
    "id": "doc_4b2e91",
    "knowledgebase_id": "kb_71ac0",
    "type": "text",
    "title": "Cancellation Policy",
    "status": "processing",
    "created_at": "2026-01-14T10:30:00Z"
  }
}