List Web app conversation messages¶
Read messages matching the published agent in a specified visitor conversation.
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.
Request¶
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:
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"
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Path |
string |
Yes |
Publication Workspace ID in the same environment. |
|
Path |
string |
Yes |
Target agent ID. |
|
Path |
string |
Yes |
From this Web app’s conversation list. |
|
Queries |
string |
No |
user/agent/system/tool/assistant; omission disables role filtering. |
|
Queries |
integer |
No |
Defaults to 50; maximum 200. Invalid/nonpositive values become 50. |
|
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¶
{
"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
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
Success code. |
|
object |
Error responses¶
Errors and read-back distinguishes parameters, permissions, and write results for this entry point.