knowledge-bases

Add a document to a knowledge base

post/knowledge-bases/{id}/documents

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

idstring uuid required

The UUID of the knowledge base

Response

The document has been accepted and is being processed in the background

idstring uuid required

The unique identifier of the document

namestring required

The name of the document

type'text' | 'data' required

The type of the source

createdBy'user' | 'llm' | 'system' required

Who created the source

createdAtstring date-time required

The date and time when the document was added

updatedAtstring date-time required

The date and time when the document was last updated

status'processing' | 'ready' | 'failed' required

The processing status of the document

processingErrorstring

Error message if processing failed (only present when status is failed)

textType'file' | 'web'

The text source subtype (e.g. file, web)

urlstring

The URL of the source (only for web sources)

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Protokoll_Stadtrat_2025-03.pdf",
  "type": "text",
  "createdBy": "user",
  "createdAt": "2025-01-15T10:00:00.000Z",
  "updatedAt": "2025-01-15T10:00:00.000Z",
  "status": "ready",
  "processingError": "OCR extraction timed out",
  "textType": "web",
  "url": "https://example.com/page"
}

Changes

No recorded changes to this operation across all 51 revisions of this API.