# list_messages: List messages across chats

List messages across all your conversations, newest first. This action only reads; it changes nothing. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/list_messages
Authorization: Bearer YOUR_KEY
content-type: application/json

{}
```

## What you give it

- `senderId` (optional): a attendee id. Only messages from this participant id. The published definition calls this "the id of the sender" without saying which id; "participant id" is this tool's own wording. Where to get it: Run `list_chat_attendees` and use `attendees[].id`.
- `before` (optional): a date and time, like 2026-10-01T00:00:00.000Z. Only items created before this moment (ISO 8601 UTC, e.g. 2026-10-01T00:00:00.000Z).
- `after` (optional): a date and time, like 2026-10-01T00:00:00.000Z. Only items created after this moment (ISO 8601 UTC, e.g. 2026-10-01T00:00:00.000Z).
- `limit` (optional): a number, 1 to 250. How many to return (1–250, default 50).
- `cursor` (optional): a cursor. nextCursor from the previous call, to get the next page. Keep the other arguments the same. Where to get it: The `nextCursor` from the last answer of `list_messages`.
- `connectionId` (optional): a connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

- `returned`: number
- `nextCursor`: a cursor
- `messages[].messageId`: string
- `messages[].providerId`: string
- `messages[].senderId`: a member id
- `messages[].text`: string or null
- `messages[].attachments[].id`: a attachment id
- `messages[].id`: a message id
- `messages[].chatId`: a chat id
- `messages[].chatProviderId`: string
- `messages[].timestamp`: string
- `messages[].isSender`: 0 | 1
- `messages[].isForwarded`: boolean
- `messages[].isViewOnce`: boolean
- `messages[].seen`: 0 | 1
- `messages[].hidden`: 0 | 1
- `messages[].deleted`: 0 | 1
- `messages[].edited`: 0 | 1
- `messages[].isEvent`: 0 | 1
- `messages[].delivered`: 0 | 1
- `messages[].behavior`: 0 or null
- `messages[].eventType`: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14
- `messages[].original`: string
- `messages[].replies`: number
- `messages[].replyBy`: string[]
- `messages[].parent`: string
- `messages[].senderAttendeeId`: a attendee id
- `messages[].subject`: string or null
- `messages[].messageType`: MESSAGE | INVITATION | INMAIL | INMAIL_DECLINE | INMAIL_REPLY | INMAIL_ACCEPT | STORY_MENTION | STORY_REPLY | CONTACT
- `messages[].attendeeType`: MEMBER | ORGANIZATION | OTHER
- `messages[].attendeeDistance`: 1 | 2 | 3 | 4 | -1
- `messages[].senderUrn`: string

Page: https://heyreagent.com/docs/actions/list_messages