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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# List messages

> Lists messages in one conversation.

`highlevel.listMessages` lists messages in one conversation.

```ts automations/highlevel-list-messages.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { highlevel } from "automate.ax/highlevel"

export default automation("List messages", () => {
  markSignificant(
    highlevel.listMessages({
      conversationId: "tDtDnQdgm2LXpyiqYvZ6",
    }),
  )
})
```

## Input

| Field            | Type                                                                                                                                                                                                                                                                                                                                                                                                                             | Required | Description                      |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------- |
| `conversationId` | `string`                                                                                                                                                                                                                                                                                                                                                                                                                         | Yes      | HighLevel conversation id value. |
| `lastMessageId`  | `string`                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | HighLevel last message id value. |
| `limit`          | `number`                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | HighLevel limit value.           |
| `type`           | `TYPE_CALL \| TYPE_SMS \| TYPE_RCS                         \| TYPE_EMAIL \| TYPE_FACEBOOK \| TYPE_GMB \| TYPE_INSTAGRAM \| TYPE_WHATSAPP \| TYPE_ACTIVITY_APPOINTMENT \| TYPE_ACTIVITY_CONTACT \| TYPE_ACTIVITY_INVOICE \| TYPE_ACTIVITY_PAYMENT \| TYPE_ACTIVITY_OPPORTUNITY \| TYPE_LIVE_CHAT \| TYPE_INTERNAL_COMMENTS \| TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG \| TYPE_TIKTOK \| TYPE_ACTIVITY_WHATSAPP \| TYPE_FORM_SUBMISSION` | No       | HighLevel type value.            |

Automate.ax supplies the connected sub-account's location ID. Optional second argument `{ account }` selects a named HighLevel binding.

## Output

| Field           | Type       | Required | Description                                                                                                                                                                                 |
| --------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lastMessageId` | `string`   | Yes      | Id of the last message in the messages array                                                                                                                                                |
| `nextPage`      | `boolean`  | Yes      | Next page value true indicates only 20 message is in the response. Rest of the messages are in the next page. Please use the lastMessageId value in the query to get the next page messages |
| `messages`      | `object[]` | Yes      | Array of messages                                                                                                                                                                           |

This action calls `GET /conversations/{conversationId}/messages` with HighLevel API version `2021-04-15` and requires `conversations/message.readonly`. HighLevel validation and permission errors fail the action. Rate limits honor the provider's retry timing.
