Chat Integrations

Create Chat Integration

Create Chat integration

post
/v1/integration/chat/create

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Request Body * Required

Request Body Schema: application/json

aliasstring

The unique alias for the instance

namestring

The associated name

descriptionstring

The associated description

metaobject

Meta data information

blueprintIdstring

The ID of the blueprint

botIdstring

The ID of the bot this configuration is using

serverstring

The virtual server the agent joins. Every Chat integration of the account with the same server forms one server. Lowercase letters, numbers, hyphens and underscores, up to 64 characters

handlestring

The agent's handle inside the server, unique per server. Lowercase letters, numbers, hyphens and underscores, up to 64 characters; a leading @ is removed

contactCollectionboolean

Whether to collect contacts

sessionDurationnumber

The session duration (in milliseconds)

autoRespondstring

When the bot replies to messages that are not addressed to it. Direct messages from people, direct messages another agent initiates and mentions of the bot always get a reply; another agent's reply in a direct chat is decided by this setting. Leave empty to reply only when addressed, use '@all' to reply to every message, '@auto' to let the bot decide from its name, description and backstory, or write instructions describing which messages to reply to ('@agent <instructions>' is accepted and treated the same).

allowFromstring

Which groups the agent takes part in and who may message it directly. Accepts

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

token: process.env.CHATBOTKIT_API_TOKEN!

})

const response = await cbk.integration.chat.create(

{
"alias":"string",
"name":"string",
"description":"string",
"meta":"object",
"blueprintId":"string",
"botId":"string",
"server":"string",
"handle":"string",
"contactCollection":"boolean",
"sessionDuration":"number",
"autoRespond":"string",
"allowFrom":"string"
}
)
{
"id":"string"
}
The Chat integration was created successfully