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": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "title": "Company Policy Document",
    "fileName": "company-policy-document.md",
    "s3Key": "my-app-id/text/f47ac10b/company-policy-document.md",
    "status": "indexing"
  }
}

Documentation Index

Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

For the complete error reference, see Error Guide.

Authorizations

apikey
string
header
required

API Key (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

201 - application/json

Text detail created and uploaded to S3 successfully

success
boolean
Example:

true

message
string
Example:

"Text detail created and uploaded successfully"

data
object