# Danh sách tin nhắn

* Lấy danh sách tin nhắn hoặc bình luận của một hội thoại.

## Request

* Xem sample Postman [tại đây](https://www.postman.com/nhanh-vn/vpage-open-nhanh-vn/request/xq8plwv/message-list?tab=body).

```curl
curl --location 'https://vpage.open.nhanh.vn/v3.0/conversation/messages?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "filters": { 
        "conversationId": "{{conversationId}}"
    },
    "paginator": {
        "size": 30, 
        "sort": {"createdAt": "desc"}
    }
}'
```

### Filters

| Key            | Type   | Description  |
| -------------- | ------ | ------------ |
| conversationId | string | ID hội thoại |

### Paginator

| Key  | Type  | Description                                                |
| ---- | ----- | ---------------------------------------------------------- |
| size | int   | Số lượng bản ghi trên 1 trang. Tối đa không quá 50         |
| next | array | Mảng dữ liệu next (được trả về từ trang trước đó - nếu có) |
| sort | array | Mảng dữ liệu các tiêu chí sort. Xem bảng bên dưới          |

* sort

| Key       | Description   | Value     |
| --------- | ------------- | --------- |
| createdAt | Thời tạo page | ASC, DESC |

## Response

* Xem cấu trúc chung [tại đây](/v3/readme.md#response).

### Failed response

* Xem các mã lỗi chung [tại đây](/v3/readme.md#failed-response).

### Successful response

```json
{
    "code": 1,
    "paginator": {
        "next": [
            1752414539,
            103507
        ]
    },
    "data": [
        {
            "id": "m_0el8TAOmOlM3g7a1J8uCiAZOYQkhWy6VQhC71nRoci-Qzt89WzXRRzP2DK1E72JIYwQf096ywuT6SxjHsNwexg",
            "conversationId": "101286204573840_4655657141168264",
            "pageId": "101286204573840",
            "senderId": "101286204573840",
            "senderName": "Nguyễn Văn A",
            "createdAt": 1752469318093,
            "message": "cảm ơn",
            "pageUserId": "4655657141168264"
        },
        {
            "id": "m_7iA2Os6paI7psEyYM-5pKgZOYQkhWy6VQhC71nRoci-Ewz9B5u0doUsPoWshzNDleLAe8uMt8twmkksEQHBylQ",
            "conversationId": "101286204573840_4655657141168264",
            "pageId": "101286204573840",
            "senderId": "101286204573840",
            "senderName": "Nguyễn Trung Tiến",
            "createdAt": 1752414540296,
            "message": "hi Nguyễn A",
            "pageUserId": "4655657141168264"
        },
        {
            "id": "m_CzBpXKWh9dlkbUFeYShxeAZOYQkhWy6VQhC71nRoci8WmsX3BmpVa_R4iHY6qK0yV9oMEeAb8dl4m5Phs8H1og",
            "conversationId": "101286204573840_4655657141168264",
            "pageId": "101286204573840",
            "senderId": "101286204573840",
            "senderName": "Nguyễn Văn B",
            "createdAt": 1752414539445,
            "message": "chào Bạn. Mình có thể giúp gì cho bạn",
            "pageUserId": "4655657141168264"
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.nhanh.vn/v3/vpage/conversation/conversation_message_list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
