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

# Conversation Detail

> Get agent conversation details

## 获取智能体对话详情

**URL:** `/v1/agent/conversations/{conversation_id}`\
**方法:** `GET`\
**描述:** 获取指定智能体对话的详细信息。

### 路径参数

| 参数名              | 类型      | 必填 | 描述    |
| ---------------- | ------- | -- | ----- |
| conversation\_id | integer | 是  | 对话 ID |

### 响应参数

| 参数名           | 类型      | 描述        |
| ------------- | ------- | --------- |
| id            | integer | 对话 ID     |
| user\_id      | integer | 用户 ID     |
| agent\_id     | integer | 智能体 ID    |
| type          | string  | 对话类型      |
| title         | string  | 对话标题      |
| status        | string  | 对话状态      |
| meta          | object  | 元数据       |
| created\_at   | integer | 创建时间戳（毫秒） |
| updated\_at   | integer | 更新时间戳（毫秒） |
| last\_message | object  | 最后一条消息    |

### 示例代码

#### cURL 示例

```bash theme={null}
curl -X GET "https://api.reportify.cn/v1/agent/conversations/683242877840089" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

#### Python 示例

```python theme={null}
import requests

url = "https://api.reportify.cn/v1/agent/conversations/683242877840089"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
data = response.json()

print(f"对话标题: {data['title']}")
print(f"对话状态: {data['status']}")
print(f"创建时间: {data['created_at']}")
```

### 响应示例

```json theme={null}
{
  "id": 683242877840089,
  "user_id": 987654321,
  "agent_id": 11887655289749510,
  "type": "agent_chat",
  "title": "nvidia 最新业绩分析",
  "status": "active",
  "meta": {},
  "created_at": 1765851195760,
  "updated_at": 1765851195768,
  "last_message": {
    "id": 123,
    "role": "assistant",
    "content": "...",
    "created_at": 1765851195768
  }
}
```

### 注意事项

* `conversation_id` 可从创建对话接口的响应中获取
* `created_at` 和 `updated_at` 为毫秒级时间戳
* `last_message` 字段包含对话中最后一条消息的信息


## OpenAPI

````yaml GET /v1/agent/conversations/{conversation_id}
openapi: 3.1.0
info:
  title: Reportify API
  version: 1.0.0
  description: API documentation for Reportify's document management and search services.
servers:
  - url: https://api.reportify.cn
    description: Production server
security:
  - BearerAuth: []
paths:
  /v1/agent/conversations/{conversation_id}:
    get:
      tags:
        - openapi-agent
      summary: Get Conversation
      description: Get agent conversation details
      operationId: >-
        get_conversation_reportify_api_v1_agent_conversations__conversation_id__get
      parameters:
        - required: true
          schema:
            type: integer
            title: Conversation Id
            description: 对话 ID
          name: conversation_id
          in: path
          example: 683242877840089
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAIAgentConversationRead'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    OAIAgentConversationRead:
      properties:
        id:
          type: integer
          title: Id
          description: 对话 ID
          example: 123456789
        user_id:
          type: integer
          title: User Id
          description: 用户 ID
          example: 987654321
        agent_id:
          type: integer
          title: Agent Id
          description: 智能体 ID
          example: 11887655289749510
        type:
          type: string
          title: Type
          description: 对话类型
          example: agent_chat
        title:
          type: string
          title: Title
          description: 对话标题
          example: nvidia 最新业绩分析
        status:
          type: string
          title: Status
          description: 对话状态
          example: active
        meta:
          type: object
          title: Meta
          description: 元数据
        created_at:
          type: integer
          title: Created At
          description: 创建时间戳（毫秒）
          example: 1765851195760
        updated_at:
          type: integer
          title: Updated At
          description: 更新时间戳（毫秒）
          example: 1765851195768
        last_message:
          type: object
          title: Last Message
          description: 最后一条消息
      type: object
      required:
        - id
        - user_id
        - agent_id
        - type
        - status
        - created_at
        - updated_at
      title: OAIAgentConversationRead
      description: Agent 对话详情
      example:
        id: 123456789
        user_id: 987654321
        agent_id: 11887655289749510
        type: agent_chat
        title: nvidia 最新业绩分析
        status: active
        created_at: 1765851195760
        updated_at: 1765851195768
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your Bearer token

````