knowledge-bases

Add a URL source to a knowledge base

post/knowledge-bases/{id}/urls

Request

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

Path parameters

idstring uuid required

The UUID of the knowledge base

Request body

urlstring required

The URL to crawl and add to the knowledge base

maxDepthnumber

How many links deep to follow from the URL when crawling (0 = just this page, 1 = + linked pages, 2 = + their links). Only same-domain links are followed. Defaults to 0.

Example request

{
  "url": "https://example.com/page",
  "maxDepth": 1
}

Response

The URL source 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 50 revisions of this API.