更新智能体配置
curl --request PATCH \
--url https://revor.ai/api/v2/agents/{agentId} \
--header 'Content-Type: application/json' \
--data '
{
"expected_updated_at": "<string>"
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}"
payload = { "expected_updated_at": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({expected_updated_at: '<string>'})
};
fetch('https://revor.ai/api/v2/agents/{agentId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_updated_at' => '<string>'
]),
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}"
payload := strings.NewReader("{\n \"expected_updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://revor.ai/api/v2/agents/{agentId}")
.header("Content-Type", "application/json")
.body("{\n \"expected_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body智能体
更新智能体配置
对指定智能体进行局部编辑,支持版本保护防止并发覆盖。
PATCH
/
api
/
v2
/
agents
/
{agentId}
更新智能体配置
curl --request PATCH \
--url https://revor.ai/api/v2/agents/{agentId} \
--header 'Content-Type: application/json' \
--data '
{
"expected_updated_at": "<string>"
}
'import requests
url = "https://revor.ai/api/v2/agents/{agentId}"
payload = { "expected_updated_at": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({expected_updated_at: '<string>'})
};
fetch('https://revor.ai/api/v2/agents/{agentId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_updated_at' => '<string>'
]),
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}"
payload := strings.NewReader("{\n \"expected_updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://revor.ai/api/v2/agents/{agentId}")
.header("Content-Type", "application/json")
.body("{\n \"expected_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body对指定智能体进行局部编辑。所有修改必须提供最近一次 GET 返回的
这三个设置对象按公开子字段局部合并,数组整体替换,保留原有私有设置。
updated_at 作为 expected_updated_at,过期版本将被拒绝。
接口概览
| 方法 | PATCH |
| 路径 | /api/v2/agents/{agentId} |
| 权限 | agents:write |
| 限流桶 | outreach_write |
| 幂等性 | 内部由版本校验保证 |
| 返回 | item,含本次保存后的版本 |
路径参数
请求体
可编辑字段
省略字段保持不变;可空文本传null 清空;数组传 [] 清空。
基础
基础
namedescriptionstatuschannel_scopestyle_tagstags
公司与发件人
公司与发件人
sender_namesender_titlesender_company_namesender_company_websitesender_company_summarysender_biosender_linkedin_urlsender_avatar_urlsource_company_url
内容
内容
goal_typeicebreaker_goal_promptautoreply_goal_prompticebreaker_system_promptautoreply_system_prompticebreaker_reference_templateautoreply_reference_templatereference_template_stricticebreaker_content_modeicebreaker_contentextra_context
时间
时间
send_languagetimezonework_time_presetsend_time_startsend_time_end
HH:mm;时区须为有效时区。渠道策略
渠道策略
linkedin_enabledwhatsapp_enabledemail_enabledlinkedin_auto_engagementautoreply_block_prior_platform_conversationlinkedin/whatsapp/email的interval_secs、daily_limit
设置对象
Knowledge settings
Knowledge settings
knowledge_settings 支持 kb_ids,仅本人或公开知识库。Autoreply stop settings
Autoreply stop settings
autoreply_stop_settings 支持信息收集规则、终止/转人工规则和最大回复轮数。Autoreply first reply settings
Autoreply first reply settings
autoreply_first_reply_settings 支持 fixed_welcome_enabled、fixed_welcome_message。cURL
curl -X PATCH "https://revor.ai/api/v2/agents/{agentId}" \
-H "Authorization: Bearer sk-revor-REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{
"expected_updated_at": "2026-11-13T04:44:50.096+00:00",
"name": "客户开发助手",
"description": null
}'
请求体
{
"expected_updated_at": "2026-11-13T04:44:50.096+00:00",
"name": "客户开发助手",
"description": null
}
响应
200
{
"ok": true,
"request_id": "req_xxx",
"item": {
"id": "agent-uuid",
"name": "客户开发助手",
"updated_at": "2026-11-13T05:00:00.000+00:00"
}
}
行为说明
- 过期版本返回
409;重新读取并确认差异后再决定是否提交,不应自动覆盖。 - 仅含版本而无修改字段的请求、未知字段和错误类型返回
400。 - 成功返回
item,包含本次保存后的版本。 - V1/V2 内容约束、必填项、限额规范化沿用现有服务。
- 模式、生成版本不可通过此接口转换。
- 新增独立内容草稿
icebreaker_ai_content、icebreaker_fixed_template可编辑。 - 附件上传、模型高级设置、
channel_settings整体对象不属于本批公共契约;未知字段明确拒绝。
数据库内部 metadata、抓取快照及凭据不在公共响应中。
错误码
| HTTP | 错误码 | 含义 |
|---|---|---|
400 | agent_input_invalid | 公共参数不符合契约 |
400 | agent_configuration_invalid | 违反现有智能体业务校验 |
403 | permission_denied | 缺少对应权限 |
404 | agent_not_found | 智能体不存在、已删除或不属于当前用户 |
409 | agent_config_conflict | 版本过期或并发修改 |
409 | agent_knowledge_base_not_found | 关联知识库不可用 |
409 | agent_account_already_bound | 账号占用冲突 |
500 | agent_operation_failed | 操作失败,需读取当前配置核对是否已保存 |

