Upload a raw document to a given assistant.
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The actual content/text of the document |
fileName | string | Yes | Name of the document file |
externalId | string | Yes | Your unique identifier for tracking this document |
folderId | string (UUID) | Yes | Folder ID where document will be stored |
assistantId | string (UUID) | No | Optional assistant ID to link folder with |
icon | string | No | Optional emoji/icon for the document (default: π) |
assistantId provided, folder is linked to that assistant| Field | Type | Description |
|---|---|---|
ragieDocument | object | Document info from Ragie API |
savedDocument | object | Document info saved in database |
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Ragie document ID |
name | string | Document name |
status | string | Processing status |
chunk_count | number | Number of chunks for AI retrieval |
external_id | string | Your external ID |
created_at | string (ISO) | Creation timestamp |
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Database document ID |
name | string | Document name |
icon | string | Document icon |
parent_folder_id | string (UUID) | Associated folder ID |
content | string | Document content |
client_id | string (UUID) | Your organization ID |
content field accepts plain text or markdown:
Plain Text:
externalId is YOUR identifier for the document:
"doc-123", "cms-article-456")| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid data or missing fields |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Folder not found |
| 500 | Internal Server Error - Something went wrong |
API key needed to authorize the request
The content of the document, the name of the file, the external id, folder id, optional assistant id and icon.
Document created successfully.