List and Create RAG Documents

View as Markdown
List all RAG documents for the authenticated user with pagination. Supports search, filtering and multiple ordering patterns. POST supports creating new documents with file upload capabilities.

Query parameters

file_typestringOptional

Filter by document_type

orderingstringOptional

Comma separated ordering fields (updated_at, document_name) prefix with - for desc

qstringOptional

Full-text search across document fields

sortstringOptional

Shortcut ordering: latest | oldest | name_asc | name_desc

statusstringOptional

Filter by upload_status

Request

This endpoint expects a multipart form.
document_namestring or nullOptional
namestringOptional

Alias for document_name

document_typeenumRequired
* `file` - File * `url` - URL * `user` - User * `text` - Text * `youtube` - YouTube * `gdrive` - Google Drive * `email` - Email * `rss` - RSS Feed
document_urlstring or nullOptional
contentstring or nullOptional
configany or nullOptional
document_filestringOptionalformat: "uri"
document_fileslist of stringsOptional

Multiple files to upload (alternative to document_file)

workspacestringRequired
workspace_idintegerOptional

ID of workspace. Optional if X-Workspace-Id header or workspace cookie sets context

Response

List of user's documents
document_idintegerRead-only
created_atdatetimeRead-only
updated_atdatetimeRead-only
file_typestring or nullRead-only
file_sizeinteger or nullRead-only
upload_statusenum
* `importing` - Importing * `vectorizing` - Vectorizing * `summarizing` - Summarizing * `uploaded` - Uploaded * `failed` - Failed
Allowed values:
status_messagestring or nullRead-only

Human-readable status / failure message for ingestion

linked_experiences_countintegerRead-only
linked_experienceslist of maps from strings to anyRead-only
has_filebooleanRead-only
descriptionstringRead-only
workspacestringRead-only
workspace_idintegerRead-only
ownerobject

Owner/uploader user object

progressintegerRead-only

Processing progress as percentage (0-100)

document_namestring or null
document_typeenum
* `file` - File * `url` - URL * `user` - User * `text` - Text * `youtube` - YouTube * `gdrive` - Google Drive * `email` - Email * `rss` - RSS Feed
document_urlstring or null
contentstring or null
configany or null

Errors

400
Bad Request Error
401
Unauthorized Error