<span id="查询web应用访客会话"></span>

# List Web App visitor conversations

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

Query visitor conversations generated by the public app for the publisher's agent.


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

<span id="调用前准备"></span>

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`; use the corresponding product API URL for a dedicated deployment.

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

<span id="请求"></span>

## 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?status=all&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?status=all&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. |
| `status` | Queries | string | No | Default active; accepts active, archived, or all. |
| `limit` | Queries | integer | No | Default 50, maximum 200. Invalid/nonpositive values use 50. |
| `offset` | Queries | integer | No | Default 0; negative values use 0. |

Limited to purpose=webapp and visible conversations. Does not exclude other visitors by the currently signed-in administrator's user ID. Read permission is agent.read; disabling a link does not hide all history. In ordinary pagination, stop when offset + items.length reaches total or items is empty. Concurrent changes may affect the result set.

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

<span id="成功响应"></span>

## Successful response

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

```json
{
  "code": 0,
  "data": {
    "items": [
      {
        "conversation_id": "conversation-example",
        "title": "公开访问对话",
        "status": "active",
        "end_user_id": "visitor-example",
        "message_count": 2,
        "created_at": "2026-11-12T01:00:00Z",
        "updated_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). |

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

<span id="错误响应"></span>

## Error responses

[Errors and rereads](lifecycle.md#errors) distinguishes parameters, permissions, and write outcomes for this entry point.
