预览多轮消息
curl --request POST \
--url https://revor.ai/api/v2/agents/{agentId}/sequence/preview \
--header 'Content-Type: application/json' \
--data '
{
"config_version": 123,
"round_no": 123,
"channel": "<string>",
"locale": "<string>",
"first_touch_subject": "<string>",
"first_touch_text": "<string>",
"recipient_name": "<string>",
"recipient_company": "<string>",
"recipient_title": "<string>",
"recipient_company_detail": "<string>",
"lead_cursor": "<string>",
"research": true,
"prior_preview_messages": [
{}
]
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}/sequence/preview"
payload = {
"config_version": 123,
"round_no": 123,
"channel": "<string>",
"locale": "<string>",
"first_touch_subject": "<string>",
"first_touch_text": "<string>",
"recipient_name": "<string>",
"recipient_company": "<string>",
"recipient_title": "<string>",
"recipient_company_detail": "<string>",
"lead_cursor": "<string>",
"research": True,
"prior_preview_messages": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config_version: 123,
round_no: 123,
channel: '<string>',
locale: '<string>',
first_touch_subject: '<string>',
first_touch_text: '<string>',
recipient_name: '<string>',
recipient_company: '<string>',
recipient_title: '<string>',
recipient_company_detail: '<string>',
lead_cursor: '<string>',
research: true,
prior_preview_messages: [{}]
})
};
fetch('https://revor.ai/api/v2/agents/{agentId}/sequence/preview', 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://revor.ai/api/v2/agents/{agentId}/sequence/preview",
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([
'config_version' => 123,
'round_no' => 123,
'channel' => '<string>',
'locale' => '<string>',
'first_touch_subject' => '<string>',
'first_touch_text' => '<string>',
'recipient_name' => '<string>',
'recipient_company' => '<string>',
'recipient_title' => '<string>',
'recipient_company_detail' => '<string>',
'lead_cursor' => '<string>',
'research' => true,
'prior_preview_messages' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://revor.ai/api/v2/agents/{agentId}/sequence/preview"
payload := strings.NewReader("{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://revor.ai/api/v2/agents/{agentId}/sequence/preview")
.header("Content-Type", "application/json")
.body("{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}/sequence/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body智能体
预览多轮消息
按轮次预览多轮触达的消息内容,付费生成。
POST
/
api
/
v2
/
agents
/
{agentId}
/
sequence
/
preview
预览多轮消息
curl --request POST \
--url https://revor.ai/api/v2/agents/{agentId}/sequence/preview \
--header 'Content-Type: application/json' \
--data '
{
"config_version": 123,
"round_no": 123,
"channel": "<string>",
"locale": "<string>",
"first_touch_subject": "<string>",
"first_touch_text": "<string>",
"recipient_name": "<string>",
"recipient_company": "<string>",
"recipient_title": "<string>",
"recipient_company_detail": "<string>",
"lead_cursor": "<string>",
"research": true,
"prior_preview_messages": [
{}
]
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}/sequence/preview"
payload = {
"config_version": 123,
"round_no": 123,
"channel": "<string>",
"locale": "<string>",
"first_touch_subject": "<string>",
"first_touch_text": "<string>",
"recipient_name": "<string>",
"recipient_company": "<string>",
"recipient_title": "<string>",
"recipient_company_detail": "<string>",
"lead_cursor": "<string>",
"research": True,
"prior_preview_messages": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config_version: 123,
round_no: 123,
channel: '<string>',
locale: '<string>',
first_touch_subject: '<string>',
first_touch_text: '<string>',
recipient_name: '<string>',
recipient_company: '<string>',
recipient_title: '<string>',
recipient_company_detail: '<string>',
lead_cursor: '<string>',
research: true,
prior_preview_messages: [{}]
})
};
fetch('https://revor.ai/api/v2/agents/{agentId}/sequence/preview', 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://revor.ai/api/v2/agents/{agentId}/sequence/preview",
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([
'config_version' => 123,
'round_no' => 123,
'channel' => '<string>',
'locale' => '<string>',
'first_touch_subject' => '<string>',
'first_touch_text' => '<string>',
'recipient_name' => '<string>',
'recipient_company' => '<string>',
'recipient_title' => '<string>',
'recipient_company_detail' => '<string>',
'lead_cursor' => '<string>',
'research' => true,
'prior_preview_messages' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://revor.ai/api/v2/agents/{agentId}/sequence/preview"
payload := strings.NewReader("{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://revor.ai/api/v2/agents/{agentId}/sequence/preview")
.header("Content-Type", "application/json")
.body("{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}/sequence/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config_version\": 123,\n \"round_no\": 123,\n \"channel\": \"<string>\",\n \"locale\": \"<string>\",\n \"first_touch_subject\": \"<string>\",\n \"first_touch_text\": \"<string>\",\n \"recipient_name\": \"<string>\",\n \"recipient_company\": \"<string>\",\n \"recipient_title\": \"<string>\",\n \"recipient_company_detail\": \"<string>\",\n \"lead_cursor\": \"<string>\",\n \"research\": true,\n \"prior_preview_messages\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body先保存并启用多轮触达配置后再调用,按轮次预览消息内容。付费生成,返回公共 job。
接口概览
| 方法 | POST |
| 路径 | /api/v2/agents/{agentId}/sequence/preview |
| 权限 | agents:write |
| 幂等性 | 需要 Idempotency-Key |
| 限流桶 | expensive_create |
| 返回 | 公共 job,通过 GET /api/v2/jobs/{id} 查询 |
路径参数
请求体
cURL
curl -X POST "https://revor.ai/api/v2/agents/{agentId}/sequence/preview" \
-H "Authorization: Bearer sk-revor-REPLACE_ME" \
-H "Idempotency-Key: agent-sequence-preview-001" \
-H "Content-Type: application/json" \
-d '{
"config_version": 1,
"round_no": 2,
"channel": "email",
"locale": "zh",
"research": false,
"first_touch_subject": "合作交流",
"first_touch_text": "此前的首轮预览正文",
"recipient_name": "Alice",
"recipient_company": "Example Manufacturing",
"prior_preview_messages": []
}'
请求体
{
"config_version": 1,
"round_no": 2,
"channel": "email",
"locale": "zh",
"research": false,
"first_touch_subject": "合作交流",
"first_touch_text": "此前的首轮预览正文",
"recipient_name": "Alice",
"recipient_company": "Example Manufacturing",
"prior_preview_messages": []
}
响应
202
{
"ok": true,
"request_id": "req_xxx",
"item": {
"id": "job-uuid",
"status": "queued",
"type": "agent_sequence_preview"
}
}
研究预览
research=true 要求该轮 preview_research_enabled=true,并提供以下之一:
first_touch_run_id(已有首轮研究 run)preview_thread_id(客户端为此预览线程生成的 UUID)
previous_run_id 引用最近前轮研究。run ID 是预览结果的 research_run_id,不是公共 job ID。
复用线程时保持相同 thread ID;用户、智能体、客户与引用的首轮/前轮正文必须匹配。普通预览不接受研究 run 引用。Meta 已批准模板直接预览模板,不支持叠加研究。
计费
- 普通预览消费一次普通触达额度。
- 研究预览消费一次研究触达额度,不叠扣。
- 结果包含
messages、agent_id、agent_version、config_version、round_no、research_run_id和账务结果。 - 冻结输入后重试复用原配置。
- 明确失败退款,未知结果保留账务恢复,不重新调用模型。
- 取消仅允许首次执行前。
行为说明
- 先保存并启用多轮配置。
- 通过
GET /api/v2/jobs/{id}(agents:read)读取结果。 - 门禁与配置读取一致,使用既有环境变量。
多轮能力需要同步更新 Web 与 Smart Outreach worker,无新增 schema 或 env;上述门禁使用既有环境变量。
错误码
| HTTP | 错误码 | 含义 |
|---|---|---|
400 | agent_input_invalid | 参数错误 |
403 | permission_denied | 缺少 agents:write |
404 | agent_not_found | 智能体不存在 |
404 | agent_sequence_unavailable | 多轮触达未开放 |
MCP 工具
revor_preview_agent_sequence
