Skip to main content
POST
/
v1
/
agent
/
conversations
Create Conversation
curl --request POST \
  --url https://api.reportify.cn/v1/agent/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": 11887655289749510,
  "title": "nvidia 最新业绩分析",
  "conversation_type": "bot_chat"
}
'
{
  "id": 123456789,
  "user_id": 987654321,
  "agent_id": 11887655289749510,
  "type": "agent_chat",
  "title": "nvidia 最新业绩分析",
  "status": "active",
  "url": "https://reportify.cn/agents/11887655289749510/chat/123456789",
  "shared_url": "https://reportify.cn/share/chat/11887655289749510-123456789",
  "created_at": 1765851195760,
  "updated_at": 1765851195768
}

创建智能体对话

URL: /v1/agent/conversations 方法: POST 描述: 创建一个新的智能体对话会话

请求参数

参数名类型必填描述
agent_idinteger智能体 ID(不传则使用系统默认智能体)
titlestring对话标题
conversation_typestring对话类型(agent_chat, task_chat, debug_chat, bot_chat)
metaobject元数据
channelstring消息来源渠道(universal-bridge, openclaw-weixin, telegram),agent 完成后回调通知

响应参数

参数名类型描述
idinteger对话 ID
user_idinteger用户 ID
agent_idinteger智能体 ID
typestring对话类型
titlestring对话标题
statusstring对话状态
urlstring对话页面链接
shared_urlstring对话分享链接
created_atinteger创建时间戳(毫秒)
updated_atinteger更新时间戳(毫秒)

请求示例

cURL
curl --request POST \
  --url https://api.reportify.cn/v1/agent/conversations \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": 11887655289749510,
  "title": "nvidia 最新业绩分析",
  "conversation_type": "bot_chat"
}'
Python
import requests

url = "https://api.reportify.cn/v1/agent/conversations"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
payload = {
    "agent_id": 11887655289749510,
    "title": "nvidia 最新业绩分析",
    "conversation_type": "bot_chat"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

响应示例

{
  "id": 123456789,
  "user_id": 987654321,
  "agent_id": 11887655289749510,
  "type": "agent_chat",
  "title": "nvidia 最新业绩分析",
  "status": "active",
  "url": "https://reportify.cn/agents/11887655289749510/chat/123456789",
  "shared_url": "https://reportify.cn/share/chat/11887655289749510-123456789",
  "created_at": 1765851195760,
  "updated_at": 1765851195768
}

Authorizations

Authorization
string
header
required

Enter your Bearer token

Body

application/json

创建 agent 对话请求

agent_id
integer

智能体 ID(可选,不传则使用系统默认智能体)

Example:

11887655289749510

title
string

对话标题

Example:

"nvidia 最新业绩分析"

conversation_type
string

对话类型(agent_chat, task_chat, debug_chat, bot_chat)

Example:

"bot_chat"

meta
Meta · object

元数据

channel
string

消息来源渠道(如 feishu, wecom, web),agent 完成后会回调通知对应渠道

Example:

"feishu"

Response

Successful Response

创建 agent 对话响应

id
integer
required

对话 ID

Example:

123456789

user_id
integer
required

用户 ID

Example:

987654321

agent_id
integer
required

智能体 ID

Example:

11887655289749510

type
string
required

对话类型

Example:

"agent_chat"

status
string
required

对话状态

Example:

"active"

created_at
integer
required

创建时间戳(毫秒)

Example:

1765851195760

updated_at
integer
required

更新时间戳(毫秒)

Example:

1765851195768

title
string

对话标题

Example:

"nvidia 最新业绩分析"

url
string

对话页面链接

Example:

"https://reportify.cn/agents/11887655289749510/chat/123456789"

shared_url
string

对话分享链接

Example:

"https://reportify.cn/share/chat/11887655289749510-123456789"