POST
/
knowledge-bases
/
{knowledge_base_id}
/
sources
curl --request POST \
  --url https://api.totoy.ai/v1/knowledge-bases/{knowledge_base_id}/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "source_id": "src_oXiYDg8QOc9JsOk86idRXiywD"
}'
{
  "source_id": "src_oXiYDg8QOc9JsOk86idRXiywD",
  "source_type": "document",
  "bytes": 1234567,
  "created_at": "2024-03-01T00:00:00Z",
  "updated_at": "2024-03-01T00:00:00Z",
  "title": "Totoy Company Overview",
  "document_file_name": "totoy-company-overview.pdf",
  "backlink": "https://www.totoy.ai/totoy-company-overview.pdf",
  "valid_from": "2024-01-01T00:00:00Z",
  "valid_until": "2026-12-31T23:59:59Z",
  "project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
  "custom_metadata": {
    "internal_tag": "general_documents"
  },
  "knowledge_base_id": "kb_feMfJbeqbAEj4u8K5HqmKpUbY",
  "status": "completed"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

knowledge_base_id
string
required

Unique identifier for a Knowledge Base.

Maximum length: 28

Body

application/json

Response

200
application/json
OK

The Knowledge Base Source represents a link to a Source (.pdf, .jpg, .png or plain-text) that has been added to a Knowledge Base, so it can be retrieved as context for a Knowledge Base Chat.