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

# Get thread messages

> Gets the list of messages of the specified thread.

## Path parameters

<ParamField path="id" type="string" required />

## Query parameters

<ParamField query="offset" type="integer" />

<ParamField query="limit" type="integer" />

## Response body

<Tabs>
  <Tab title="200">
    <ResponseField name="messages" type="Message[]">
      <Expandable title="properties">
        <ResponseField name="agent_id" type="integer" />

        <ResponseField name="attachments" type="Attachment[]">
          <Expandable title="properties">
            <ResponseField name="attachment_movements" type="AttachmentMovements">
              <Expandable title="properties">
                <ResponseField name="movements" type="AttachmentMovedTo[]">
                  <Expandable title="properties">
                    <ResponseField name="agent_id" type="integer" />

                    <ResponseField name="customer_id" type="string" />

                    <ResponseField name="file_id" type="string" />
                  </Expandable>
                </ResponseField>

                <ResponseField name="total" type="integer" />
              </Expandable>
            </ResponseField>

            <ResponseField name="file_mime" type="string" />

            <ResponseField name="file_name" type="string" />

            <ResponseField name="file_not_dangerous" type="boolean">
              null means not verified
            </ResponseField>

            <ResponseField name="file_size" type="integer" />

            <ResponseField name="file_type" type="string" />

            <ResponseField name="id" type="string" />
          </Expandable>
        </ResponseField>

        <ResponseField name="bcc" type="string" />

        <ResponseField name="cc" type="string" />

        <ResponseField name="content" type="string" />

        <ResponseField name="created_at" type="string" />

        <ResponseField name="delivery" type="MessageDelivery">
          <Expandable title="properties" />
        </ResponseField>

        <ResponseField name="error_when_trying_to_send" type="string" />

        <ResponseField name="external_message_id" type="string" />

        <ResponseField name="from" type="string" />

        <ResponseField name="id" type="string" />

        <ResponseField name="mailbox_id" type="string" />

        <ResponseField name="origin" type="MessageOrigin">
          <Expandable title="properties" />
        </ResponseField>

        <ResponseField name="priority" type="integer" />

        <ResponseField name="raw_message" type="string" />

        <ResponseField name="read_by_agents" type="integer[]" />

        <ResponseField name="reply_to_external_message_id" type="string" />

        <ResponseField name="subject" type="string" />

        <ResponseField name="to" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer" />
  </Tab>

  <Tab title="default">
    unexpected error

    <ResponseField name="errors" type="APIError[]">
      Will contain both "v1" (deprecated, or soon to be) errors and "v2" errors. When possible, prefer errors that are not deprecated.

      <Expandable title="properties">
        <ResponseField name="code" type="string" />

        <ResponseField name="deprecated" type="boolean" />

        <ResponseField name="message" type="string" />

        <ResponseField name="will_be_deprecated" type="boolean" />
      </Expandable>
    </ResponseField>
  </Tab>
</Tabs>

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

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

<script type="application/javascript">document.body.style.opacity = 0;</script>

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/decrypt.js" />

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/text-replace.js" />
