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

# Fetch Thread

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

## Request

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

Fetch a single thread of the chatbot

## Path parameters

- `chatbotId` string, required
- `threadId` string, required

## Query parameters

- `skipMessages` boolean
- `includeChatUser` boolean

## 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
    - `thread` Thread: Chatbot Thread
      - `threadId` string: Id of the chatbot thread
      - `chatbotId` string: Id of the chatbot
      - `chatUserId` string, nullable: Id of the user chatting in the 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 conversation has been escalated or not
      - `webhookUrl` string, nullable: All messages are sent to this webhook url
      - `webhookToken` string, nullable: The token which is sent in header in the calls made to the above webhook url for all messages
      - `messages` ThreadMessage[]: Messages of the 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
        - `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
      - `totalMessagesRead` integer: Number of messages that are read in this thread
      - `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

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `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)
