Skip to main content
POST
/
api
/
documents
/
assistant
/
raw
Upload a raw document to a given assistant
curl --request POST \
  --url https://api.example.com/api/documents/assistant/raw \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "content": "<string>",
  "fileName": "<string>",
  "externalId": "<string>",
  "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'

Headers

x-api-key
string
required

API key needed to authorize the request

Body

application/json

The content of the document, the name of the file, the external id, folder id, optional assistant id and icon.

content
string
required
Minimum string length: 1
fileName
string
required
Minimum string length: 1
externalId
string
required
Minimum string length: 1
folderId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
assistantId
string<uuid>
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
icon
string
Maximum string length: 50

Response

Document created successfully.