POST
/
chatbots
/
{chatbotId}
/
knowledge-base
/
data-sources
/
texts
curl --request POST \
  --url https://api.chatling.ai/v2/chatbots/{chatbotId}/knowledge-base/data-sources/texts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "texts": [
    "<string>"
  ]
}'
{
    "status": "success",
    "data": {
        "texts_added": 45
    }
}

Request parameters

Path

chatbotId
string
required

The chatbot ID.

Body

texts
string[]
required

Array of texts to add to the knowledge base.

Response

status
string

The status of the request. Will be success if the request was successful, otherwise error.

data
object
{
    "status": "success",
    "data": {
        "texts_added": 45
    }
}