> ## 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 direct messages

> List one-to-one Slack direct-message conversations visible to the bot.

`listDirectMessages` lists one-to-one direct-message conversations visible to
the installed bot. Use the returned conversation ID with message and history
actions.

## Example

```ts automations/list-slack-dms.automation.ts theme={null}
import { automation } from "automate.ax"
import { listDirectMessages } from "automate.ax/slack"

export default automation("List Slack DMs", () => {
  listDirectMessages({ limit: 100 })
})
```

## Inputs

| Input     | Type                                             | Required | Default         | Description                           |
| --------- | ------------------------------------------------ | -------- | --------------- | ------------------------------------- |
| `cursor`  | `string`                                         | No       | First page      | Opaque cursor from the previous page. |
| `limit`   | `number`                                         | No       | Slack default   | Requested page size from 1 to 200.    |
| `account` | `string \| IntegrationAccountReference<"slack">` | No       | Project default | Slack workspace binding.              |

## Output

Returns `conversations` and `responseMetadata.nextCursor`. A direct-message
conversation has `id`, usually `userId`, and `isDirectMessage`; other common
conversation metadata may also be present.
