Add source (auto-create KB)
Shortcut endpoint — add a URL, file, or text source without creating a knowledge base first.
OneInbox automatically creates a knowledge base named after the source (the URL domain for URLs, the file name for files, or the first 60 characters of text for text sources) and returns the new knowledge_base_id alongside the source and job records.
Use this to get started in a single API call. Use POST /v1/knowledge-bases/{kb_id}/sources when you need a custom KB name, chunk size, or multilingual settings.
Returns 202 immediately — content is processed asynchronously. Poll job status before using the KB in calls.
| Source type | Form fields |
|---|---|
| URL | type=url, source=<public_url> |
| File | file=<binary> — do not include a type field |
| Text | type=text, source=<text_content> |
Supported file formats: PDF, DOCX, XLSX, TXT, MD
Documentation Index
Fetch the complete documentation index at: https://docs.oneinbox.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Use api_key from POST /v1/api-keys
Body
Source type. Required for URL and text sources. Omit entirely when uploading a file.
url, text "url"
The URL or raw text to index. Required when type is url or text.
"https://docs.yourproduct.com/faq"
File to upload. Required when adding a file source. Supported formats — PDF, DOCX, XLSX, TXT, MD.
Response
Accepted — KB auto-created and source is processing asynchronously
ID of the auto-created knowledge base.
"kb_abc123"
The created source record
The background processing job. Poll GET /v1/knowledge-bases/{kb_id}/jobs/{job_id} for status.
"Knowledge base auto-created. Source accepted. Ingestion is running in the background."