保存多轮触达配置
curl --request PUT \
--url https://revor.ai/api/v2/agents/{agentId}/sequence \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 123,
"enabled": true,
"rounds": [
{
"rounds[].wait_days": 123,
"rounds[].strategy_key": "<string>",
"rounds[].content_generation_mode": "<string>",
"rounds[].content_input": "<string>",
"rounds[].attachment_mode": "<string>",
"rounds[].preview_research_enabled": true
}
],
"research_activation_version": 123
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}/sequence"
payload = {
"expected_version": 123,
"enabled": True,
"rounds": [
{
"rounds[].wait_days": 123,
"rounds[].strategy_key": "<string>",
"rounds[].content_generation_mode": "<string>",
"rounds[].content_input": "<string>",
"rounds[].attachment_mode": "<string>",
"rounds[].preview_research_enabled": True
}
],
"research_activation_version": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 123,
enabled: true,
rounds: [
{
'rounds[].wait_days': 123,
'rounds[].strategy_key': '<string>',
'rounds[].content_generation_mode': '<string>',
'rounds[].content_input': '<string>',
'rounds[].attachment_mode': '<string>',
'rounds[].preview_research_enabled': true
}
],
research_activation_version: 123
})
};
fetch('https://revor.ai/api/v2/agents/{agentId}/sequence', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 123,
'enabled' => true,
'rounds' => [
[
'rounds[].wait_days' => 123,
'rounds[].strategy_key' => '<string>',
'rounds[].content_generation_mode' => '<string>',
'rounds[].content_input' => '<string>',
'rounds[].attachment_mode' => '<string>',
'rounds[].preview_research_enabled' => true
]
],
'research_activation_version' => 123
]),
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"
payload := strings.NewReader("{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://revor.ai/api/v2/agents/{agentId}/sequence")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}/sequence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}"
response = http.request(request)
puts response.read_body智能体
保存多轮触达配置
保存或关闭智能体的多轮触达配置,支持版本保护。
PUT
/
api
/
v2
/
agents
/
{agentId}
/
sequence
保存多轮触达配置
curl --request PUT \
--url https://revor.ai/api/v2/agents/{agentId}/sequence \
--header 'Content-Type: application/json' \
--data '
{
"expected_version": 123,
"enabled": true,
"rounds": [
{
"rounds[].wait_days": 123,
"rounds[].strategy_key": "<string>",
"rounds[].content_generation_mode": "<string>",
"rounds[].content_input": "<string>",
"rounds[].attachment_mode": "<string>",
"rounds[].preview_research_enabled": true
}
],
"research_activation_version": 123
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}/sequence"
payload = {
"expected_version": 123,
"enabled": True,
"rounds": [
{
"rounds[].wait_days": 123,
"rounds[].strategy_key": "<string>",
"rounds[].content_generation_mode": "<string>",
"rounds[].content_input": "<string>",
"rounds[].attachment_mode": "<string>",
"rounds[].preview_research_enabled": True
}
],
"research_activation_version": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 123,
enabled: true,
rounds: [
{
'rounds[].wait_days': 123,
'rounds[].strategy_key': '<string>',
'rounds[].content_generation_mode': '<string>',
'rounds[].content_input': '<string>',
'rounds[].attachment_mode': '<string>',
'rounds[].preview_research_enabled': true
}
],
research_activation_version: 123
})
};
fetch('https://revor.ai/api/v2/agents/{agentId}/sequence', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 123,
'enabled' => true,
'rounds' => [
[
'rounds[].wait_days' => 123,
'rounds[].strategy_key' => '<string>',
'rounds[].content_generation_mode' => '<string>',
'rounds[].content_input' => '<string>',
'rounds[].attachment_mode' => '<string>',
'rounds[].preview_research_enabled' => true
]
],
'research_activation_version' => 123
]),
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"
payload := strings.NewReader("{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://revor.ai/api/v2/agents/{agentId}/sequence")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}/sequence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 123,\n \"enabled\": true,\n \"rounds\": [\n {\n \"rounds[].wait_days\": 123,\n \"rounds[].strategy_key\": \"<string>\",\n \"rounds[].content_generation_mode\": \"<string>\",\n \"rounds[].content_input\": \"<string>\",\n \"rounds[].attachment_mode\": \"<string>\",\n \"rounds[].preview_research_enabled\": true\n }\n ],\n \"research_activation_version\": 123\n}"
response = http.request(request)
puts response.read_body保存或关闭指定智能体的多轮触达配置。PUT 完整替换后续轮次,使用 GET 的
version 作为 expected_version。
接口概览
| 方法 | PUT |
| 路径 | /api/v2/agents/{agentId}/sequence |
| 权限 | agents:write |
| 限流桶 | outreach_write |
| 返回 | item 和 result(published/existing) |
路径参数
请求体
cURL
curl -X PUT "https://revor.ai/api/v2/agents/{agentId}/sequence" \
-H "Authorization: Bearer sk-revor-REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{
"expected_version": 0,
"enabled": true,
"rounds": [
{
"wait_days": 3,
"strategy_key": "value_add",
"content_generation_mode": "ai_personalized",
"content_input": "提供新的产品应用案例,询问是否需要样品",
"preview_research_enabled": false,
"attachment_mode": "none"
}
]
}'
请求体
{
"expected_version": 0,
"enabled": true,
"rounds": [
{
"wait_days": 3,
"strategy_key": "value_add",
"content_generation_mode": "ai_personalized",
"content_input": "提供新的产品应用案例,询问是否需要样品",
"preview_research_enabled": false,
"attachment_mode": "none"
}
]
}
响应
200
{
"ok": true,
"request_id": "req_xxx",
"item": {
"version": 1,
"enabled": true,
"updated_at": "2026-11-13T05:00:00.000+00:00"
},
"result": "published"
}
轮次内容限制
- 支持
1-10个后续轮次,每轮等待1-30天。 - 可使用单个
content_input,或独立ai_content/fixed_content草稿。提供任一草稿时按所选模式读取对应草稿。 - 文本最多
16,000字符。 - 还可提供
goal_type、supplementary_instruction。
附件
reuse使用首轮已上传附件。custom的attachments必须与该智能体已上传附件的file_name/file_url/mime_type/size_bytes一致。- 最多 3 个且合计不超过 5 MB。此接口不上传附件。
WhatsApp 模板
Meta WhatsApp 轮次可指定waba_template_binding_id 与 waba_template_connect_account_id,服务端重新校验账号归属、模板用途及 APPROVED 状态,不接受客户端填写模板名称。
行为说明
- 版本冲突返回
409agent_sequence_config_conflict,请重新 GET 核对。 - 关闭时提交
enabled: false并携带已有的可编辑 rounds,不用空数组;不要把 GET 中只读字段原样写回。 - 配置保存会复用现有发布服务,后台同步关联计划,可能接纳符合现有规则的历史首触达目标。
- 关闭会收口后续计划;已发送事实不改写。
- 保存成功不等于所有计划同步或所有在途发送已撤回。
不要把此接口当成无副作用的草稿保存。保存成功不等于所有计划同步或所有在途发送已撤回。
错误码
| HTTP | 错误码 | 含义 |
|---|---|---|
400 | agent_input_invalid | 参数错误 |
403 | permission_denied | 缺少 agents:write |
404 | agent_not_found | 智能体不存在 |
404 | agent_sequence_unavailable | 多轮触达未开放 |
409 | agent_sequence_config_conflict | 版本过期或并发修改 |
MCP 工具
revor_update_agent_sequence
