CRBNai API
  1. Chats
CRBNai API
  • README
  • Authentication
  • Guides
    • Creating a Knowledge Bot
  • API Keys
    • Get all API Keys
      GET
    • Create API Key
      POST
    • Delete API Key
      DELETE
  • Chats
    • Messages
      • Get Chat Messages
      • Post Chat Message
    • Recipes
      • Get All Chat Recipes
    • Get All Chats
      GET
    • Create Chat
      POST
  • Documents
    • Delete Document
      DELETE
    • Download Document
      GET
    • Update Document
      PUT
  • Knowledge Bots
    • Documents
      • Add Document to Knowledge Bot
      • Prepare Document Upload
    • Chats
      • Chat Messages
        • Get Messages of a Knowledge Bot chat
        • Post a message to a Knowlege Bot chat
      • Get all Knowledge Bot chats
        GET
      • Create Knowledge Bot chat
        POST
    • Chats - deprecated
      • Chat with a Knowledge Bot
    • Create Knowledge Bot
      POST
    • Get All Knowledge Bots
      GET
    • Get Knowledge Bot by ID
      GET
    • Delete Knowledge Bot by ID
      DELETE
    • Update Knowledge Bot by ID
      PUT
  1. Chats

Create Knowledge Bot chat

POST
/api/knowledge-bots/{knowledgeBotId}/chats
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.crbnai.com/api/knowledge-bots//chats' \
--header 'Content-Type: application/json' \
--data-raw '{
    "external_id": "tid_12542",
    "user_metadata": {
        "thread_id": "tid_12542"
    },
    "system_prompt": "Your name is Tom and you are an expert about the history of New York."
}'
Response Response Example
{
  "created_at": "2023-11-28T23:22:39.717484+00:00",
  "id": "kbc_01hgc3vt7b876qxvbf09qnw5m2",
  "knowledge_bot_id": "kb_01ha1ntvyq68jxezgnkwr63wm1",
  "last_message_at": "2023-11-28T23:22:39.717484+00:00",
  "llm_config": {
    "model": "gpt-35-turbo",
    "vendor": "openai",
    "defaults": {
      "max_tokens": 2500,
      "temperature": 0.5
    }
  },
  "owner_id": "user_01ha1nt7y4ee0gh7p19qfyqm6p",
  "updated_at": "2023-11-28T23:22:39.717484+00:00",
  "user_metadata": null,
  "external_id": "test"
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
knowledgeBotId
string 
required
Body Params application/json
external_id
string 
optional
user_metadata
object 
optional
system_prompt
string 
optional
Optional system prompt that will be embedded in a larger proprietary prompt.
Examples

Responses

🟢200OK
application/json
Body
object {0}
Previous
Get all Knowledge Bot chats
Next
Chat with a Knowledge Bot
Built with