---
title: "Fetch All Threads"
method: GET
path: "/v0/chatbots/{chatbotId}/threads"
tags: ["Chatbot Threads"]
---

# Fetch All Threads

`GET /v0/chatbots/{chatbotId}/threads`

## Request

- Base URL: `https://sitegpt.ai/api`
- URL: `https://sitegpt.ai/api/v0/chatbots/{chatbotId}/threads`
- Auth: HTTP bearer

Fetch all threads of the chatbot

## Path parameters

- `chatbotId` string, required

## Response `200`

OK

- object: Success Response
  - `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
    - `threads` ThinThread[]: List of threads of the chatbot
      - `threadId` string: Id of the chatbot thread
      - `mode` 'AI' | 'AGENT': Mode of the thread
      - `startedAt` string, date-time: Timestamp indicating when the thread has been started
      - `updatedAt` string, date-time: Timestamp indicating when the thread has been last updated
      - `endedAt` string, date-time: Timestamp indicating when the thread has been ended
      - `escalated` boolean: Indicates whether the thread is escalated or not
      - `important` boolean: Indicates whether the thread is marked as important or not
      - `resolved` boolean: Indicates whether the thread is resolved or not
      - `totalMessages` integer: Count of total messages
      - `totalPositiveMessages` integer: Count of total positive messages
      - `totalNegativeMessages` integer: Count of total negative messages
      - `totalGpt4MessagesCount` integer: Count of total GPT-4.1 messages
      - `totalMessagesRead` integer: Number of messages that have are already read
      - `chatUser` ChatUser, nullable: Chat User
        - `id` string: Id of the user
        - `name` string: Name of the user
        - `email` string, email: Email Id of the user
        - `phone` string: Phone Number of the user
        - `verified` boolean: Indicates whether the user is verified or not
        - `createdAt` string, date-time: Timestamp indicating when the user is created
        - `updatedAt` string, date-time: Timestamp indicating when the user is last updated
      - `lastMessage` ThreadLastMessage: Last message of a thread
        - `messageId` string: Id of the message
        - `messageType` 'NORMAL_MESSAGE' | 'USER_MESSAGE' | 'AGENT_MESSAGE' | 'SYSTEM_MESSAGE': Type of the message in the thread
        - `systemMessageType` 'CONVERSATION_ESCALATED' | 'EXCEEDED_USAGE_LIMITS' | 'EMAIL_VERIFIED' | 'ENTERED_WRONG_OTP' | 'PROVIDED_EMAIL' | 'PERSONA_SELECTED' | 'PROBLEMS_WITH_UPSTREAM_PROVIDER' | 'COLLECT_LEAD': Type of the message if type of the message is SYSTEM_MESSAGE
        - `threadId` string: Id of the thread this message belongs to
        - `chatbotId` string: Id of the chatbot this message belongs to
        - `question` ChatQuestionAnswer, nullable: Model for question/answer in the chat
          - `text` string: Text containing either question or the answer
          - `timestamp` string, date-time: Timestamp of the question asked or answer replied
        - `answer` ChatQuestionAnswer, nullable: Model for question/answer in the chat
          - `text` string: Text containing either question or the answer
          - `timestamp` string, date-time: Timestamp of the question asked or answer replied
        - `reaction` 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL': User's reaction to the message
        - `sources` string[]: Sources used to answer the question
        - `escalated` boolean: Indicates whether this message is escalated or not
        - `iconUrl` string, nullable: Url of the icon used in this message
        - `prompts` QuickPrompt[], nullable: Quick prompts that have been configured by chatbot owner
          - `id` string: Id of the conversation-starter
          - `title` string: Title of the conversation-starter. This is the text that is shown as button in the chatbot.
          - `link` string, nullable: Link of the conversation starter. If this link is not null, then when you click on the conversation starter in the chatbot, this link will be opened instead of sending a message to the chatbot.
          - `description` string: Description of the conversation-starter. This is the message that will be sent to the chatbot when you click on the conversation-starter inside the chatbot.
        - `gptModel` string: GPT Model used to answer the question

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `405`: Method Not Allowed
- `500`: Internal Server Error

---

[API](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection.md) · [All operations](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection/llms.txt) · [OpenAPI document](https://skmtc.dev/sitegpt/apis/sitegpt-api-collection/revisions/aec0de1a00af?raw)
