# List Web app conversation messages

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Read messages matching the published agent in a specified visitor conversation.


```http
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agents/{agent_id}/webapp/conversations/{conversation_id}/messages
```

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`. For private deployments, use the corresponding product API URL.

[Prepare publication management identity and objects](objects.md#prepare).

## Request

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agents/$AGENT_ID/webapp/conversations/$CONVERSATION_ID/messages?role=user&limit=50&offset=0" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

Next-page example:

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agents/$AGENT_ID/webapp/conversations/$CONVERSATION_ID/messages?role=user&limit=50&offset=50" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameters

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | Path | string | Yes | Publication Workspace ID in the same environment. |
| `agent_id` | Path | string | Yes | Target agent ID. |
| `conversation_id` | Path | string | Yes | From this Web app's conversation list. |
| `role` | Queries | string | No | user/agent/system/tool/assistant; omission disables role filtering. |
| `limit` | Queries | integer | No | Defaults to 50; maximum 200. Invalid/nonpositive values become 50. |
| `offset` | Queries | integer | No | Defaults to 0; negative values become 0. |

The conversation must belong to the current Workspace and target Agent definition, have purpose=webapp, and be visible. Do not substitute a normal signed-in conversation ID or another app's conversation ID. Stop pagination when offset + items.length reaches total or items is empty. Concurrent changes may affect the paginated set.

:::::
::::::
:::::::

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": 0,
  "data": {
    "items": [
      {
        "id": "message-example",
        "workspace_id": "workspace-example",
        "conversation_id": "conversation-example",
        "role": "user",
        "parts": [
          {
            "kind": "text",
            "text": "你好"
          }
        ],
        "seq": 1,
        "created_at": "2026-11-12T01:00:00Z"
      }
    ],
    "total": 1,
    "limit": 50,
    "offset": 0
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | Success code. |
| `data` | object | [Corresponding object](objects.md#responses). |

:::::
::::::
:::::::

## Error responses

[Errors and read-back](lifecycle.md#errors) distinguishes parameters, permissions, and write results for this entry point.
