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

# Update thread

> Updates the specified chat thread.

## Path parameters

**id** `string` *required*

## Body parameters

**comment** `string`

**customer\_external\_ids** `string[]`

**customer\_ids** `string[]`

**reminder** `ThreadReminderInput`

**properties**

**delay** `integer`

**number\_left** `integer`

**status** `integer`

**tag\_codes** `string[]`

## Response body

> [tab] 200
>
> **attachments** `Attachment[]`
>
> **properties**
>
> **attachment\_movements** `AttachmentMovements`
>
> **properties**
>
> **movements** `AttachmentMovedTo[]`
>
> **properties**
>
> **agent\_id** `integer`
>
> **customer\_id** `string`
>
> **file\_id** `string`
>
> **total** `integer`
>
> **file\_mime** `string`
>
> **file\_name** `string`
>
> **file\_not\_dangerous** `boolean`
>
> null means not verified
>
> **file\_size** `integer`
>
> **file\_type** `string`
>
> **id** `string`
>
> **client\_id** `integer`
>
> **contacts** `string[]`
>
> **created\_at** `string`
>
> **customers** `Customer[]`
>
> **properties**
>
> **account\_number** `string`
>
> **account\_type** `CustomerAccountType`
>
> **properties**
>
> **alias\_ids** `string[]`
>
> **client\_id** `string`
>
> **comment** `string`
>
> **company\_name** `string`
>
> **contacts** `string`
>
> **created\_at** `string`
>
> **created\_by** `integer`
>
> **custom\_fields** `object`
>
> **customer\_type** `string`
>
> **date\_of\_birth** `string`
>
> **disabled** `boolean`
>
> **domicile\_code** `string`
>
> **domicile\_codes** `string[]`
>
> **external\_id** `string`
>
> **first\_name** `string`
>
> **id** `string`
>
> **kyc\_level** `integer`
>
> **last\_name** `string`
>
> **middle\_name** `string`
>
> **name\_variations** `CustomerNameVariation[]`
>
> **properties**
>
> **company\_name** `string`
>
> **first\_name** `string`
>
> **last\_name** `string`
>
> **middle\_name** `string`
>
> **trading\_name** `string`
>
> **nationality\_code** `string`
>
> deprecated. Use nationality\_codes instead
>
> **nationality\_codes** `string[]`
>
> **parent\_external\_id** `string`
>
> **phone** `string`
>
> **registration\_number** `string`
>
> **review\_groups** `string[]`
>
> **revision\_number** `string`
>
> **trading\_name** `string`
>
> **external\_message\_ids** `string[]`
>
> **id** `string`
>
> **last\_message** `Message`
>
> **properties**
>
> **agent\_id** `integer`
>
> **attachments** `Attachment[]`
>
> **properties**
>
> **attachment\_movements** `AttachmentMovements`
>
> **properties**
>
> **movements** `AttachmentMovedTo[]`
>
> **properties**
>
> **agent\_id** `integer`
>
> **customer\_id** `string`
>
> **file\_id** `string`
>
> **total** `integer`
>
> **file\_mime** `string`
>
> **file\_name** `string`
>
> **file\_not\_dangerous** `boolean`
>
> null means not verified
>
> **file\_size** `integer`
>
> **file\_type** `string`
>
> **id** `string`
>
> **bcc** `string`
>
> **cc** `string`
>
> **content** `string`
>
> **created\_at** `string`
>
> **delivery** `MessageDelivery`
>
> **properties**
>
> **error\_when\_trying\_to\_send** `string`
>
> **external\_message\_id** `string`
>
> **from** `string`
>
> **id** `string`
>
> **mailbox\_id** `string`
>
> **origin** `MessageOrigin`
>
> **properties**
>
> **priority** `integer`
>
> **raw\_message** `string`
>
> **read\_by\_agents** `integer[]`
>
> **reply\_to\_external\_message\_id** `string`
>
> **subject** `string`
>
> **to** `string`
>
> **message\_count** `integer`
>
> **reminder** `ThreadReminder`
>
> **properties**
>
> **delay** `integer`
>
> **next\_date** `string`
>
> **number\_left** `integer`
>
> **review\_groups** `string[]`
>
> **status** `ThreadStatus`
>
> **properties**
>
> **tags** `string[]`
>
> **updated\_at** `string`

> [tab] default
>
> unexpected error
>
> **errors** `APIError[]`
>
> Will contain both "v1" (deprecated, or soon to be) errors and "v2" errors. When possible, prefer errors that are not deprecated.
>
> **properties**
>
> **code** `string`
>
> **deprecated** `boolean`
>
> **message** `string`
>
> **will\_be\_deprecated** `boolean`

```json JSON
{
  "comment": "string",
  "customer_external_ids": [
    "string"
  ],
  "customer_ids": [
    "string"
  ],
  "reminder": {
    "delay": "integer",
    "number_left": "integer"
  },
  "status": "integer",
  "tag_codes": [
    "string"
  ]
}
```

```javascript JavaScript

  const response = await fetch(
    "POST /api/v1/thread/{id}",
    {
      method: "post",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer {token}`
      },
      body: JSON.stringify({
  "comment": "string",
  "customer_external_ids": [
    "string"
  ],
  "customer_ids": [
    "string"
  ],
  "reminder": {
    "delay": "integer",
    "number_left": "integer"
  },
  "status": "integer",
  "tag_codes": [
    "string"
  ]
})
    }
  );
            
          
```

```json 200
{
  "attachments": [
    {
      "attachment_movements": {
        "movements": [
          {
            "agent_id": "integer",
            "customer_id": "string",
            "file_id": "string"
          }
        ],
        "total": "integer"
      },
      "file_mime": "string",
      "file_name": "string",
      "file_not_dangerous": "boolean",
      "file_size": "integer",
      "file_type": "string",
      "id": "string"
    }
  ],
  "client_id": "integer",
  "contacts": [
    "string"
  ],
  "created_at": "string",
  "customers": [
    {
      "account_number": "string",
      "account_type": {},
      "alias_ids": [
        "string"
      ],
      "client_id": "string",
      "comment": "string",
      "company_name": "string",
      "contacts": "string",
      "created_at": "string",
      "created_by": "integer",
      "custom_fields": "object",
      "customer_type": "string",
      "date_of_birth": "string",
      "disabled": "boolean",
      "domicile_code": "string",
      "domicile_codes": [
        "string"
      ],
      "external_id": "string",
      "first_name": "string",
      "id": "string",
      "kyc_level": "integer",
      "last_name": "string",
      "middle_name": "string",
      "name_variations": [
        {
          "company_name": "string",
          "first_name": "string",
          "last_name": "string",
          "middle_name": "string",
          "trading_name": "string"
        }
      ],
      "nationality_code": "string",
      "nationality_codes": [
        "string"
      ],
      "parent_external_id": "string",
      "phone": "string",
      "registration_number": "string",
      "review_groups": [
        "string"
      ],
      "revision_number": "string",
      "trading_name": "string"
    }
  ],
  "external_message_ids": [
    "string"
  ],
  "id": "string",
  "last_message": {
    "agent_id": "integer",
    "attachments": [
      {
        "attachment_movements": {
          "movements": [
            {
              "agent_id": "integer",
              "customer_id": "string",
              "file_id": "string"
            }
          ],
          "total": "integer"
        },
        "file_mime": "string",
        "file_name": "string",
        "file_not_dangerous": "boolean",
        "file_size": "integer",
        "file_type": "string",
        "id": "string"
      }
    ],
    "bcc": "string",
    "cc": "string",
    "content": "string",
    "created_at": "string",
    "delivery": {},
    "error_when_trying_to_send": "string",
    "external_message_id": "string",
    "from": "string",
    "id": "string",
    "mailbox_id": "string",
    "origin": {},
    "priority": "integer",
    "raw_message": "string",
    "read_by_agents": [
      "integer"
    ],
    "reply_to_external_message_id": "string",
    "subject": "string",
    "to": "string"
  },
  "message_count": "integer",
  "reminder": {
    "delay": "integer",
    "next_date": "string",
    "number_left": "integer"
  },
  "review_groups": [
    "string"
  ],
  "status": {},
  "tags": [
    "string"
  ],
  "updated_at": "string"
}
```

```json default
{
  "errors": [
    {
      "code": "string",
      "deprecated": "boolean",
      "message": "string",
      "will_be_deprecated": "boolean"
    }
  ]
}
```



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.