POST
/
api
/
v2
/
data-sources
/
file
curl --request POST \
  --url https://app.livechatai.com/api/v2/data-sources/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "Product Manual",
  "content": "This section explains the product features and usage instructions...",
  "agentId": "clx1234567890abcdef",
  "fileType": "pdf"
}'
{
  "status": "success",
  "data": {
    "message": "Added successfully",
    "item": {
      "id": "ds_1234567890",
      "source": "PDF",
      "isGeneratedByAI": false
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Details for the file data source.

The body is of type object.

Response

200
application/json

File data source created successfully

The response is of type object.