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

# Search threads

> Searches for threads that match the input filters.

## Body parameters

**filters** `SearchThreadsFiltersInput`

**properties**

**assigned\_to\_member\_id** `integer`

**contact** `string`

**content** `string`

**customer\_id** `string`

**customer\_name** `string`

**id** `string`

**max\_created\_at** `string`

**max\_updated\_at** `string`

**min\_created\_at** `string`

**min\_updated\_at** `string`

**only\_without\_assignment** `boolean`

**only\_without\_review\_groups** `boolean`

**review\_groups** `string[]`

**status** `integer`

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

**on\_page** `integer`

**per\_page** `integer`

## Response body

> [tab] 200
>
> **data** `Thread[]`
>
> **properties**
>
> **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`
>
> **total** `integer`

> [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
{
  "filters": {
    "assigned_to_member_id": "integer",
    "contact": "string",
    "content": "string",
    "customer_id": "string",
    "customer_name": "string",
    "id": "string",
    "max_created_at": "string",
    "max_updated_at": "string",
    "min_created_at": "string",
    "min_updated_at": "string",
    "only_without_assignment": "boolean",
    "only_without_review_groups": "boolean",
    "review_groups": [
      "string"
    ],
    "status": "integer",
    "tag_codes": [
      "string"
    ]
  },
  "on_page": "integer",
  "per_page": "integer"
}
```

```javascript JavaScript

  const response = await fetch(
    "POST /api/v1/thread/search",
    {
      method: "post",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer {token}`
      },
      body: JSON.stringify({
  "filters": {
    "assigned_to_member_id": "integer",
    "contact": "string",
    "content": "string",
    "customer_id": "string",
    "customer_name": "string",
    "id": "string",
    "max_created_at": "string",
    "max_updated_at": "string",
    "min_created_at": "string",
    "min_updated_at": "string",
    "only_without_assignment": "boolean",
    "only_without_review_groups": "boolean",
    "review_groups": [
      "string"
    ],
    "status": "integer",
    "tag_codes": [
      "string"
    ]
  },
  "on_page": "integer",
  "per_page": "integer"
})
    }
  );
            
          
```

```json 200
{
  "data": [
    {
      "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"
    }
  ],
  "total": "integer"
}
```

```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.