---
title: "Send Message"
method: POST
path: "/v0/chatbots/{chatbotId}/message"
tags: ["Chatbot Messages"]
---

# Send Message

`POST /v0/chatbots/{chatbotId}/message`

## Request

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

Send message to a particular thread or start a new thread

## Path parameters

- `chatbotId` string, required

## Request body

- object: Request Body
  - `threadId` string: If provided, message will be sent to the thread with this threadId. Otherwise, message will be sent to a new thread. This is mandatory when from is AGENT.
  - `message` string, required: Actual text containing the message
  - `from` 'USER' | 'AGENT': Indicates who all can send messages to the chat threads
  - `iconUrl` string: Icon url to be associated with the message in the conversation thread
  - `agentName` string: Agent name to be associated with the message in the conversation thread
  - `prompts` object[]: Prompts should be provided only when from is AGENT. This provides user list of options to choose from after the message is sent.
    - `title` string: Title of the prompt, this will be shown to the user in the chatbot after the message
    - `description` string: Description of the prompt, this will be sent to the chatbot when user clicks on any one of the options provided by the prompts
  - `includeSmartPrompts` boolean: Flag to decide whether to return smart followup questions based on the AI response.

## Response `200`

OK

- object: Sucess 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
    - `message` object: Message object
      - `id` string: Id of the message
      - `chatbotId` string: Id of the chatbot
      - `threadId` string: Id of the thread this message has been sent 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
      - `sources` string[]: Sources referred to provide the above answer
      - `gptModel` 'gpt-3.5-turbo' | 'gpt-4': All available GPT models
      - `messageType` 'NORMAL_MESSAGE' | 'USER_MESSAGE' | 'AGENT_MESSAGE' | 'SYSTEM_MESSAGE': Type of the message in the thread
      - `iconUrl` string, nullable: Icon url associated with the message in the conversation thread
      - `agentName` string, nullable: Agent name associated with the message in the conversation thread
      - `prompts` QuickPrompt[]: List of prompts of this message
        - `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.
      - `smartPrompts` string[]: Smart followup questions based on the AI response. Only returned when includeSmartPrompts is true and from is USER in the request.
      - `reaction` 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL': User's reaction to the message

## 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)
