Create Bot Session

Create bot session

post
/v1/bot/{botId}/session/create

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

botIdstring* Required

The ID of the bot for this session

Request Body * Required

Request Body Schema: application/json

durationInSecondsnumber

The maximum amount of time this session will stay open

messagesarray

An array of messages to be included in the conversation

typestring

The type of the message

textstring

The text of the message

metaobject

Meta data information

curl -X POST "https://api.chatbotkit.com/v1/bot/{botId}/session/create" \

-H "Authorization: Bearer $CHATBOTKIT_API_SECRET" \

-H "Content-Type: application/json" \

--data-binary @- << EOF {
"durationInSeconds":"number",
"messages":[
{
"type":"string",
"text":"string"
}
],
"meta":"object"
}
EOF
{
"id":"string",
"conversationId":"string",
"token":"string",
"expiresAt":"number",
"messages":[
{
"type":"string",
"text":"string"
}
]
}
The bot was deleted successfully