Skip to main content
POST
/
chatbot
/
create-chat
Create a new chat session
curl --request POST \
  --url https://api.cleartalk.ai/chatbot/create-chat \
  --header 'Content-Type: application/json' \
  --data '
{
  "pathwayID": "pathway-123",
  "chatbotID": 1,
  "request_data": {
    "user_name": "John Doe",
    "account_id": "12345"
  }
}
'
{
  "pathwayID": "pathway-123",
  "chatbotID": 1,
  "request_data": {
    "user_name": "John Doe",
    "account_id": "12345"
  }
}

Body

application/json
pathwayID
string
required

Pathway ID for the chat session

Example:

"pathway-123"

chatbotID
number
required

ID of the chatbot to create chat with

Example:

1

request_data
object

Initial variables accessible in pathway nodes via {{variable_name}}

Example:
{
"user_name": "John Doe",
"account_id": "12345"
}

Response

201 - application/json

Chat created successfully

pathwayID
string
required

Pathway ID for the chat session

Example:

"pathway-123"

chatbotID
number
required

ID of the chatbot to create chat with

Example:

1

request_data
object

Initial variables accessible in pathway nodes via {{variable_name}}

Example:
{
"user_name": "John Doe",
"account_id": "12345"
}