GET
/
v0
/
chatbots
/
{chatbotId}
/
threads
curl --request GET \
  --url https://sitegpt.ai/api/v0/chatbots/{chatbotId}/threads \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Fetched the chatbot threads successfully",
  "data": {
    "threads": [
      {
        "threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
        "startedAt": "2023-05-18T11:39:57.349750Z",
        "updatedAt": "2023-05-18T11:39:57.349750Z",
        "endedAt": "2023-05-18T11:39:57.349750Z",
        "chatUser": null,
        "escalated": false,
        "important": false,
        "resolved": false,
        "totalMessagesRead": 47,
        "lastMessage": {
          "answer": {
            "text": "This is agent!!",
            "timestamp": "2023-07-10T14:41:46.808649Z"
          },
          "sources": [],
          "reaction": "NEUTRAL",
          "threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
          "messageType": "AGENT_MESSAGE",
          "prompts": [
            {
              "id": "f3792c3c-5814-4dec-b530-55e1611951a9",
              "title": "Prompt 1",
              "description": "This is the prompt1 description"
            },
            {
              "id": "64d7fb10-847a-4dd7-8b5b-821fca199606",
              "title": "Prompt 2",
              "description": "This is the prompt2 description"
            }
          ],
          "messageId": "369876016179446353",
          "question": null,
          "chatbotId": "365062873485935184"
        },
        "totalMessages": 47,
        "totalPositiveMessages": 0,
        "totalNegativeMessages": 0,
        "totalGpt4MessagesCount": 0
      },
      {
        "threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
        "startedAt": "2023-05-19T14:33:08.252701Z",
        "updatedAt": "2023-05-19T14:33:08.252701Z",
        "endedAt": "2023-05-19T14:33:08.252701Z",
        "chatUser": null,
        "escalated": false,
        "important": false,
        "resolved": false,
        "totalMessagesRead": 0,
        "lastMessage": {
          "question": {
            "text": "This is bot",
            "timestamp": "2023-05-19T14:33:08.771854Z"
          },
          "sources": [],
          "reaction": "NEUTRAL",
          "threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
          "messageType": "USER_MESSAGE",
          "iconUrl": "https://avatars.githubusercontent.com/u/17903466?s=48&v=4",
          "messageId": "365164430725481040",
          "answer": null,
          "chatbotId": "365062873485935184",
          "prompts": []
        },
        "totalMessages": 1,
        "totalPositiveMessages": 0,
        "totalNegativeMessages": 0,
        "totalGpt4MessagesCount": 0
      },
      {
        "threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
        "startedAt": "2023-05-18T11:47:48.313693Z",
        "updatedAt": "2023-05-18T11:47:48.313693Z",
        "endedAt": "2023-05-18T11:47:48.313693Z",
        "chatUser": null,
        "escalated": false,
        "important": false,
        "resolved": false,
        "totalMessagesRead": 0,
        "lastMessage": {
          "question": {
            "text": "Hello, what is this?",
            "timestamp": "2023-05-18T11:47:57.194303Z"
          },
          "answer": {
            "text": "This is a website where you can find information on various topics. Please browse our pages to learn more.",
            "timestamp": "2023-05-18T11:47:57.194303Z"
          },
          "gptModel": "gpt-3.5-turbo",
          "sources": [],
          "reaction": "NEUTRAL",
          "threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
          "messageType": "NORMAL_MESSAGE",
          "messageId": "365063440720462416",
          "chatbotId": "365062873485935184",
          "prompts": []
        },
        "totalMessages": 1,
        "totalPositiveMessages": 0,
        "totalNegativeMessages": 0,
        "totalGpt4MessagesCount": 0
      }
    ]
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chatbotId
string
required

Id of the chatbot

Response

200 - application/json
success
boolean

Indicates whether this is success response or error response

message
string

Overall message regarding the operation performed

data
object

Data returned from the server