Skip to content

Upload a file

post/upload-file/{chatbotId}
Any key

Upload a file to be used with a chatbot, for example as a files attachment in /chat or /live-chat. The file is stored in the chatbot's folder under its original name. If a file with that name already exists, it is not replaced: nothing is uploaded and the existing file's URL is returned. Uploads count toward the workspace's file storage limit.

Path parameters

Required
chatbotIdstring
The unique identifier allocated to the chatbot.

Request body

Sending 1 of 1 field
Required
filefile
The file to upload.

Only these fields are sent (multipart/form-data).

Try it · POST /upload-file/{chatbotId}
curl 'https://api.chat-data.com/api/v2/upload-file/6650f1c2a9e4b83d2c7a1f05' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY" \  -F 'file=@"/path/to/file.pdf"'
Loading…

Responses

Successful response.

Content type: application/json

FieldDescription
statusstringOne of: success.
urlstringThe URL where the uploaded file can be accessed, with a read-only SAS token.

Example

{  "status": "success",  "url": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f05/product-handbook.pdf?sv=2024-11-04&se=2026-11-13T09%3A30%3A00Z&sr=b&sp=r&sig=Xq7mB2v9KpL4tR8wN1cZ5yF3hJ6dS0aE%2BuG7iO2kQ%3D"}

Last updated October 14, 2026