# Source: https://docs.chatling.ai/api-reference/v2/conversations/update-conversation.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatling.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update conversation

> Update a conversation's properties.

## Request parameters

### Path

<ParamField path="chatbotId" type="string" required>
  The chatbot ID.
</ParamField>

<ParamField path="conversationId" type="string" required>
  The conversation ID.
</ParamField>

### Body

At least one of the following properties is required.

<ParamField body="archive" type="boolean">
  Whether to archive the conversation.
</ParamField>

<ParamField body="important" type="boolean">
  Whether to mark the conversation as important.
</ParamField>

<ParamField body="contact_id" type="string">
  The ID of the contact to associate with the conversation.
</ParamField>

## Response

<ResponseField name="status" type="string">
  The status of the request. Will be `success` if the request was successful, otherwise `error`.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The unique identifier of the conversation.
    </ResponseField>

    <ResponseField name="contact_id" type="string">
      The unique identifier of the contact associated with the conversation.
    </ResponseField>

    <ResponseField name="archived" type="boolean">
      Whether the conversation is archived (by the admin).
    </ResponseField>

    <ResponseField name="important" type="boolean">
      Whether the conversation is marked as important.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      The date and time when the conversation was created.
    </ResponseField>

    <ResponseField name="messages" type="array">
      <Expandable title="properties">
        <ResponseField name="id" type="string">
          The unique identifier of the message.
        </ResponseField>

        <ResponseField name="text" type="string">
          The text content of the message.
        </ResponseField>

        <ResponseField name="role" type="string">
          The role of the sender of the message (bot, user, or system).
        </ResponseField>

        <ResponseField name="is_ai_kb_response" type="boolean">
          Whether the message is generated by the AI using the knowledge base.
        </ResponseField>

        <ResponseField name="data" type="object">
          The data of the message. Varies depending on the message type.

          <Expandable title="properties">
            <ResponseField name="helpful_value" type="string">
              (AI response) Whether the AI's response was marked as helpful by the user. Possible values are `1` for helpful, `0` for not helpful, and `null` for not rated.
            </ResponseField>

            <ResponseField name="sources" type="string">
              (AI response) The sources used by the AI to generate the response.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="created_at" type="string">
          The date and time when the message was created.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json  theme={null}
  {
      "status": "success",
      "data": {
              "id": "8977617953",
              "contact_id": "qtr89df0-112d-d197-b541-3f8674663246",
              "archived": 0,
              "important": 1,
              "created_at": "2024-06-14T15:45:34+00:00",
              "messages": [
                  {
                      "text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.",
                      "role": "bot",
                      "is_ai_kb_response": true,
                      "data": {
                          "helpful_value": null,
                          "sources": [
                              {
                                  "type": "webpage",
                                  "title": "Types of variables - Chatling Documentation",
                                  "url": "https://docs.chatling.ai/builder/variables/variable-types"
                              },
                              {
                                  "type": "webpage",
                                  "title": "Sidebar - Chatling Documentation",
                                  "url": "https://docs.chatling.ai/builder/sidebar"
                              },
                              {
                                  "type": "webpage",
                                  "title": "What are variables? - Chatling Documentation",
                                  "url": "https://docs.chatling.ai/builder/variables/what-are-variables"
                              }
                          ]
                      },
                      "created_at": "2024-06-17T16:09:52+00:00"
                  },
                  {
                      "text": "What are system variables",
                      "role": "user",
                      "created_at": "2024-06-17T16:09:45+00:00"
                  },
                  {
                      "text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!",
                      "role": "bot",
                      "is_ai_kb_response": true,
                      "data": {
                          "helpful_value": null,
                          "sources": []
                      },
                      "created_at": "2024-06-14T15:45:39+00:00"
                  },
                  {
                      "text": "Hello!",
                      "role": "user",
                      "created_at": "2024-06-14T15:45:34+00:00"
                  }
              ]
          }
  }
  ```
</ResponseExample>