cURL
curl --request POST \ --url https://sitegpt.ai/api/v0/chatbots/{chatbotId}/threads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "threadId": "xyz", "mode": "AI", "chatUserEmail": null } '
200
Success Response
{ "success": true, "message": "Created the chatbot thread successfully", "data": { "thread": { "threadId": "d2cd2d88-bac1-48de-a7b4-19797451f47g", "mode": "AI", "messages": [], "startedAt": "2024-05-07T06:26:01.674375Z", "updatedAt": "2024-05-07T06:26:01.674375Z", "chatUserId": null, "chatbotId": "361628903185318481", "chatUser": null } }}
Create an empty thread of the chatbot.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Id of the chatbot
Request Body
If you pass the threadId, new thread will be created with this threadId. Otherwise, random threadId will be generated.
Mode of the chat
AI
AGENT
Email of the user that is going to chat in the thread.
OK
Indicates whether this is success response or error response
Overall message regarding the operation performed
Data returned from the server
Show child attributes
Was this page helpful?