Skip to main content
POST
/
KnowledgeBaseChat
Create a knowledge base chat
curl --request POST \
  --url https://api.starleads.co/KnowledgeBaseChat \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data @- <<EOF
{
  "name": "Support Bot KB",
  "datasetIds": [
    "ds_abc123"
  ],
  "llmSettings": {
    "temperature": 0.7,
    "topP": 0.9,
    "presencePenalty": 0,
    "frequencyPenalty": 0
  },
  "promptSettings": {
    "similarityThreshold": 0.2,
    "topN": 6,
    "prompt": "Answer based on the context: {context}",
    "emptyResponse": "I don't have information about that."
  }
}
EOF
{
  "id": "chat_def456",
  "name": "Support Bot KB",
  "datasetIds": [
    "ds_abc123"
  ],
  "datasetNames": [
    "My Knowledge Base"
  ],
  "connectedAgentCount": 0,
  "llmSettings": {
    "temperature": 0.7,
    "topP": 0.9,
    "presencePenalty": 0,
    "frequencyPenalty": 0
  },
  "promptSettings": {
    "similarityThreshold": 0.2,
    "topN": 6,
    "prompt": "Answer based on the context: {context}",
    "emptyResponse": "I don't have information about that."
  },
  "createdAt": "2026-04-15T10:30:00Z",
  "updatedAt": "2026-04-15T10:30:00Z"
}

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header.

Body

application/json

Request payload to create a new knowledge base chat

name
string
required

Chat name

Maximum string length: 255
datasetIds
string[]
required

Dataset IDs to connect

llmSettings
object

LLM configuration parameters exposed to the API (excludes model name)

promptSettings
object

RAG prompt configuration

Response

Chat created successfully

Public representation of a knowledge base chat

id
string

Chat identifier

name
string

Chat name

datasetIds
string[] | null

Connected dataset IDs

datasetNames
string[] | null

Connected dataset names (read-only)

connectedAgentCount
integer<int32> | null

Number of agents using this chat

llmSettings
object

LLM configuration parameters exposed to the API (excludes model name)

promptSettings
object

RAG prompt configuration

createdAt
string<date-time>

Creation timestamp

updatedAt
string<date-time> | null

Last update timestamp