POST
/
api
/
v2
/
data-sources
/
text
Create a text data source
curl --request POST \
  --url https://app.livechatai.com/api/v2/data-sources/text \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "Company Overview",
  "content": "Our company specializes in AI-powered agent solutions that help businesses automate customer support...",
  "agentId": "clx1234567890abcdef"
}'
{
  "status": "success",
  "data": {
    "message": "Added successfully",
    "item": {
      "id": "ds_1234567890",
      "source": "TEXT",
      "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 text data source.

title
string
required

Title of the text data source

Example:

"Company Overview"

content
string
required

Content of the text data source

Example:

"Our company specializes in AI-powered agent solutions that help businesses automate customer support..."

agentId
string
required

Unique identifier of the agent

Example:

"clx1234567890abcdef"

Response

Text data source created successfully

status
string
Example:

"success"

data
object