πŸ“œ 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

Uploads a raw document (text-based) to a given assistant.

Click to expand full details

πŸ”Ή URL

POST /api/public/documents/assistant/raw

πŸ”Ή Body Parameters

NameTypeRequiredDescription
contentstringβœ…The content of the document (plain text)
fileNamestringβœ…Display name for the file
externalIdstringβœ…Unique external identifier for the document
assistantIdstringβœ…The assistant this document is linked to

πŸ”Ή Headers

NameTypeRequiredDescription
x-api-keystringβœ…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

Deletes a previously uploaded document using its externalId.

Click to expand full details

πŸ”Ή URL

DELETE /api/public/documents/assistant/{externalId}

πŸ”Ή Path Parameters

NameTypeRequiredDescription
externalIdstringβœ…The unique identifier of the document to delete

πŸ”Ή Headers

NameTypeRequiredDescription
x-api-keystringβœ…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'