> ## 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.

# 獲取小組件對話

> 單個小組件會話的完整消息記錄，包括客服（operator）消息。

## 身份驗證

需要提供 Bearer 令牌（API 密鑰）或儀表盤會話。

## 路徑參數

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

<ParamField path="sessionId" type="string" required>
  會話的 UUID。
</ParamField>

## 響應

<ResponseField name="session" type="object">
  會話元數據：`id`、`visitor_id`、`ip_country`、`city`、`page_url`、`referrer_url`、`started_at`、`ended_at`、`last_seen_at`、`message_count`、`lead_captured`、`lead_data`、`duration_seconds`、`takeover_status`、`taken_over_by`、`taken_over_at`、`last_operator_message_at`。
</ResponseField>

<ResponseField name="messages" type="array">
  按順序排列的消息記錄。每條消息包含：`id`、`role`（`user`、`assistant` 或 `operator`）、`content`、`mode`、`resolved_mode`、`cost_cents`、`operator_user_id`、`created_at`。
</ResponseField>

## 示例

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


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