π Assistant Documents
Use these endpoints to upload and manage raw documents associated with a specific assistant. These documents can enhance the assistantβs responses by feeding it context-relevant information.
π½ POST /api/public/documents/assistant/raw
β Upload a Raw Document to an Assistant
POST /api/public/documents/assistant/raw
β Upload a Raw Document to an AssistantUploads a raw document (text-based) to a given assistant.
Click to expand full details
πΉ URL
POST /api/public/documents/assistant/raw
πΉ Body Parameters
Name | Type | Required | Description |
---|---|---|---|
content | string | β | The content of the document (plain text) |
fileName | string | β | Display name for the file |
externalId | string | β | Unique external identifier for the document |
assistantId | string | β | The assistant this document is linked to |
πΉ Headers
Name | Type | Required | Description |
---|---|---|---|
x-api-key | string | β | Your API key for authorization |
πΉ Example Request
curl --request POST \
'https://iris-backend-production.up.railway.app/api/public/documents/assistant/raw' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"content": "Returns are accepted within 30 days.",
"fileName": "return_policy.txt",
"externalId": "return-policy-2024",
"assistantId": "123456"
}'
π½ DELETE /api/public/documents/assistant/{externalId}
β Delete a Document from an Assistant
DELETE /api/public/documents/assistant/{externalId}
β Delete a Document from an AssistantDeletes a previously uploaded document using its externalId
.
Click to expand full details
πΉ URL
DELETE /api/public/documents/assistant/{externalId}
πΉ Path Parameters
Name | Type | Required | Description |
---|---|---|---|
externalId | string | β | The unique identifier of the document to delete |
πΉ Headers
Name | Type | Required | Description |
---|---|---|---|
x-api-key | string | β | Your API key for authorization |
πΉ Example Request
curl --request DELETE \
'https://iris-backend-production.up.railway.app/api/public/documents/assistant/return-policy-2024' \
--header 'x-api-key: YOUR_API_KEY'
Updated 16 days ago