Skip to content

Create Session API | YourGPT Chatbot

To start interacting with YourGPT Chatbot, create a session using the following API.

Terminal window
curl --location 'https://api.yourgpt.ai/chatbot/v1/createSession' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'api-key: YOUR_API_KEY' \
--data-urlencode 'widget_uid=YOUR_WIDGET_UID'

API Response

{
"type": "RXSUCCESS",
"message": "Session created successfully",
"data": {
"session_uid": "1234567890",
"status": "open",
"createdAt": "2024-08-02T12:21:08.540Z"
}
}