Skip to main content
POST
/
ai-agents
/
agent-builder
/
knowledge-base
/
text
Create Text Entry
curl --request POST \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/text \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "title": "Company Policy Document",
  "text": "This document outlines the company policies and procedures for remote work, including communication guidelines, working hours expectations, and performance metrics."
}
'
{
  "success": true,
  "message": "Text detail created and uploaded successfully",
  "data": {
    "uniqueId": "<string>",
    "title": "<string>",
    "fileName": "<string>",
    "s3Key": "<string>",
    "status": "indexing"
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Body

application/json
title
string
required

Title of the text content

Maximum string length: 500
Example:

"Company Policy Document"

text
string
required

Text content to be processed

Maximum string length: 5000
Example:

"This document outlines the company policies and procedures..."

Response

Text detail created and uploaded to S3 successfully

success
boolean
Example:

true

message
string
Example:

"Text detail created and uploaded successfully"

data
object