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"
}
'import requests
url = "https://api.reportify.cn/v1/agent/conversations"
payload = {
"agent_id": 11887655289749510,
"title": "nvidia 最新业绩分析",
"conversation_type": "bot_chat"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 11887655289749510,
title: 'nvidia 最新业绩分析',
conversation_type: 'bot_chat'
})
};
fetch('https://api.reportify.cn/v1/agent/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/agent/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 11887655289749510,
'title' => 'nvidia 最新业绩分析',
'conversation_type' => 'bot_chat'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/agent/conversations"
payload := strings.NewReader("{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/agent/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/agent/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}"
response = http.request(request)
puts response.read_body{
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}智能体接口
Create Conversation
Create a new agent conversation
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"
}
'import requests
url = "https://api.reportify.cn/v1/agent/conversations"
payload = {
"agent_id": 11887655289749510,
"title": "nvidia 最新业绩分析",
"conversation_type": "bot_chat"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 11887655289749510,
title: 'nvidia 最新业绩分析',
conversation_type: 'bot_chat'
})
};
fetch('https://api.reportify.cn/v1/agent/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/agent/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 11887655289749510,
'title' => 'nvidia 最新业绩分析',
'conversation_type' => 'bot_chat'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/agent/conversations"
payload := strings.NewReader("{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/agent/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/agent/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 11887655289749510,\n \"title\": \"nvidia 最新业绩分析\",\n \"conversation_type\": \"bot_chat\"\n}"
response = http.request(request)
puts response.read_body{
"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
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}创建智能体对话
URL:/v1/agent/conversations
方法: POST
描述: 创建一个新的智能体对话会话
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| agent_id | integer | 否 | 智能体 ID(不传则使用系统默认智能体) |
| title | string | 否 | 对话标题 |
| conversation_type | string | 否 | 对话类型(agent_chat, task_chat, debug_chat, bot_chat) |
| meta | object | 否 | 元数据 |
| channel | string | 否 | 消息来源渠道(universal-bridge, openclaw-weixin, telegram),agent 完成后回调通知 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| id | integer | 对话 ID |
| user_id | integer | 用户 ID |
| agent_id | integer | 智能体 ID |
| type | string | 对话类型 |
| title | string | 对话标题 |
| status | string | 对话状态 |
| url | string | 对话页面链接 |
| shared_url | string | 对话分享链接 |
| created_at | integer | 创建时间戳(毫秒) |
| updated_at | integer | 更新时间戳(毫秒) |
请求示例
cURLcurl --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"
}'
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
Enter your Bearer token
Body
application/json
创建 agent 对话请求
Response
Successful Response
创建 agent 对话响应
对话 ID
Example:
123456789
用户 ID
Example:
987654321
智能体 ID
Example:
11887655289749510
对话类型
Example:
"agent_chat"
对话状态
Example:
"active"
创建时间戳(毫秒)
Example:
1765851195760
更新时间戳(毫秒)
Example:
1765851195768
对话标题
Example:
"nvidia 最新业绩分析"
对话页面链接
Example:
"https://reportify.cn/agents/11887655289749510/chat/123456789"
对话分享链接
Example:
"https://reportify.cn/share/chat/11887655289749510-123456789"
⌘I
