Skip to main content
POST
Create Document
This endpoint creates a new document in a knowledge base. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.

Path Parameters

integer
required
The unique identifier of the knowledge base

Request Body

string
required
The name of the document (max. 255 characters)
string
Optional description of the document (max. 255 characters)
string
required
Document type: website, pdf, txt or docx

Website Documents

string
The main URL to scrape. Required if links is not provided.
Array of specific URLs to scrape. Required if url is not provided.
Maximum number of relative links to follow when scraping (1-50)

File Documents (PDF, TXT, DOCX)

file
required
The file to upload (max. 20MB). Use multipart/form-data encoding.

Response Fields

string
Success message
object
The created document object

Document Types

Document processing is asynchronous. Call the Get Document endpoint to check when processing is complete.