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

# Update Thread

`PATCH /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

Update thread of the chatbot.
The following thread properties can be updated.
1. Mode
2. Webhook url
3. Webhook token
4. Chat User details

## Path parameters

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

## Request body

- object: Request body
  - `mode` 'AI' | 'AGENT': Chat mode of the thread
  - `webhookUrl` string: Webhook url for the thread where all messages are forwarded to
  - `webhookToken` string: This token will be sent in headers to the webhook url for all the messages
  - `chatUser` object: Details of the user chatting in the thread
    - `email` string, required: Email of the chat user
    - `name` string: Name of the chat user
    - `phoneNumber` string: Phone number of the chat user

## 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, nullable: Data returned from the server

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