> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取小组件会话列表

> 分页返回某个小组件的访客会话，每个会话附带一行预览内容。

## 身份验证

需要 Bearer 令牌（API 密钥）或仪表盘会话。

## 路径参数

<ParamField path="id" type="string" required>
  小组件配置的 UUID。
</ParamField>

## 查询参数

<ParamField query="limit" type="number" default="50">
  每页数量（最大 200）。
</ParamField>

<ParamField query="offset" type="number" default="0">
  要跳过的会话数量。
</ParamField>

<ParamField query="from" type="string">
  ISO 时间戳下限（含边界值）。
</ParamField>

<ParamField query="to" type="string">
  ISO 时间戳上限（含边界值）。
</ParamField>

<ParamField query="has_lead" type="string">
  `true` 或 `false` —— 按是否已捕获潜在客户进行过滤。
</ParamField>

<ParamField query="status" type="string">
  `active`、`completed` 或 `all`。
</ParamField>

## 响应

<ResponseField name="conversations" type="array">
  每个会话包含：`session_id`、`visitor_id`、`ip_country`、`city`、`page_url`、`started_at`、`ended_at`、`last_seen_at`、`message_count`、`lead_captured`、`lead_data`、`first_message`（预览内容）、`duration_seconds`、`referrer_url`、`takeover_status`。
</ResponseField>

<ResponseField name="total" type="number">
  符合过滤条件的会话总数。
</ResponseField>

<ResponseField name="limit" type="number" />

<ResponseField name="offset" type="number" />

## 示例

```bash curl theme={null}
curl "https://www.hitheo.ai/api/v1/iframes/CONFIG_ID/conversations?status=active" \
  -H "Authorization: Bearer $THEO_API_KEY"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.