---
title: "获取 AI 助手会话线程"
method: GET
path: "/v1/analytics/{projectId}/assistant/threads/{threadId}"
tags: ["Analytics"]
language: "zh-Hans"
---

# 获取 AI 助手会话线程

`GET /v1/analytics/{projectId}/assistant/threads/{threadId}`

## Request

- Base URL: `https://api.mintlify.com`
- URL: `https://api.mintlify.com/v1/analytics/{projectId}/assistant/threads/{threadId}`
- Auth: HTTP bearer

获取单个 AI 助手会话线程的完整消息转录。线程 ID 可从 AI 助手会话端点获取，或在支持路由使用 **Link** 模式时，作为 AI 助手支持 URL 上追加的 `threadId` 查询参数获取。

使用管理员 API 密钥进行身份验证。

## Path parameters

- `projectId` string, required: 你的项目 ID，可在控制台的 [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) 页面中复制。
- `threadId` string, ulid, required: AI 助手会话线程 ID（ULID）。

## Response `200`

会话转录

- AssistantThreadResponse
  - `threadId` string, required: AI 助手会话线程标识符（ULID）。
  - `createdAt` string, required: 线程创建时间戳。
  - `messages` object[], required: 该线程中按顺序排列的消息列表。
    - `id` string, required: 消息的唯一标识符。
    - `role` 'user' | 'assistant', required: 该消息由用户还是 AI 助手发送。
    - `content` string, required: 消息的文本内容。
    - `createdAt` string, required: 消息发送时间戳。

## Other responses

- `400`: 线程 ID 无效，或项目 ID 格式错误。
- `401`: API 密钥缺失或无效，或者你的方案不包含 API 访问权限。
- `403`: 你的请求来自不在该 API 密钥允许列表中的 IP 地址。
- `404`: 该线程不存在，或该项目不存在或不属于你的组织。
- `429`: 你已超出分析端点的速率限制。
- `500`: 发生意外的服务器错误。请重试该请求。如果错误仍然存在，请联系支持团队。

## Changes

- **2026-11-18** `f0aae58f3af8`: 1 breaking
  - for the `path` request parameter `threadId`, the format changed from no format to `ulid`
- **2026-10-30** `5cdecd920d06`: 3 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `429`
- **2026-08-14** `26a999e6102a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/changes/v1/analytics/:projectId/assistant/threads/:threadId/get.md)

---

[API](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh.md) - [All operations](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/llms.txt) - [OpenAPI document](https://skmtc.dev/mintlify/apis/mintlify-analytics-export-api/zh/revisions/f0aae58f3af8?raw)
