Create document
Knowledgebases
Create document
Add a new document to a knowledgebase
POST
Create document
This endpoint creates a new document in a knowledgebase. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.Documentation Index
Fetch the complete documentation index at: https://docs.autocalls.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
The unique identifier of the knowledgebase
Request Body
The name of the document (max 255 characters)
Optional description of the document (max 255 characters)
Document type:
website, pdf, txt, or docxWebsite Documents
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)
The file to upload (max 20MB). Use
multipart/form-data encoding.Response
Success message
The created document object
Document Types
| Type | Description | Input |
|---|---|---|
website | Scrapes web pages and extracts text content | URL or list of URLs |
pdf | Extracts text from PDF files | PDF file upload |
txt | Plain text content | TXT file upload |
docx | Extracts text from Word documents | DOCX file upload |
Example: Creating a Website Document
Example: Uploading a PDF Document
Document processing is asynchronous. Poll the get document endpoint to check when processing is complete.

