POST
/
api
/
v2
/
data-sources
/
file
Create a file data source
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.

title
string
required

Title of the file data source

Example:

"Product Manual"

content
string
required

Content extracted from the file

Example:

"This section explains the product features and usage instructions..."

agentId
string
required

Unique identifier of the agent

Example:

"clx1234567890abcdef"

fileType
enum<string>
required

Type of file being uploaded

Available options:
pdf,
docx,
image
Example:

"pdf"

Response

File data source created successfully

status
string
Example:

"success"

data
object