# `bird amb conversations list-messages`

## Usage

```bash
bird amb conversations list-messages <conversation-id> [flags]
```

## Description

Returns the messages in a conversation, newest first, both received and sent. To page through older messages, use `starting_after`. The sort order is fixed, so to render the messages in conversation order, reverse the page yourself.

Returns a paginated JSON envelope; narrow with the filters below and page with --limit and --starting-after.

## Examples

```bash
bird amb conversations list-messages <conversation-id>
bird amb conversations list-messages <conversation-id> | jq -r '.data[].id'
bird amb conversations list-messages <conversation-id> --limit 50 --starting-after <cursor>
```

## Options

#### Filters

| Name                | Description                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------- |
| `--direction`       | Filter to received (inbound) or sent (outbound) messages. Possible values: outbound, inbound. |
| `--response-schema` | Print the fields this command returns, then exit                                              |

#### Pagination

| Name               | Description                                                                                                                                                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--ending-before`  | Cursor from the prev\_cursor or refresh\_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev\_cursor returns the preceding page. refresh\_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since. |
| `--limit <n>`      | Maximum number of items to return per page.                                                                                                                                                                                                                                                                                                             |
| `--starting-after` | Cursor from the next\_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.                                                                                                                                                                                                          |

## Related

| Name                                                                            | Description             |
| ------------------------------------------------------------------------------- | ----------------------- |
| [`bird amb conversations get`](/docs/cli/reference/amb-conversations-get)       | Get a conversation      |
| [`bird amb conversations list`](/docs/cli/reference/amb-conversations-list)     | List conversations      |
| [`bird amb conversations typing`](/docs/cli/reference/amb-conversations-typing) | Send a typing indicator |
| [`bird amb conversations update`](/docs/cli/reference/amb-conversations-update) | Update a conversation   |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
