外呼任务
POST
/api/open/outbound-tasks创建一个新的外呼任务,包含任务配置和呼叫条目。
请求参数
namestring必填任务名称
agent_uuidstring必填AI Agent UUID
number_uuidstring必填外显号码 UUID
start_datestring必填开始日期,格式 YYYY-MM-DD
end_datestring可选结束日期,格式 YYYY-MM-DD
time_slotsstring必填时间段 JSON,如 [{“start”:“09:00”,“end”:“18:00”}]
itemsarray必填呼叫条目列表,至少 1 条
items 子项
phonestring必填电话号码
namestring必填客户姓名
extrastring可选JSON 字符串;通话时可在 Agent Prompt 里用
{{customer.extra.xxx}} 引用,详见 Prompt 变量章节POST
/api/open/outbound-tasks/:uuid/pause暂停外呼任务。仅 pending 或 running 状态的任务可操作。
路径参数
uuidstring必填任务 UUID
data 返回更新后的任务对象,结构同 OutboundTaskResponse(详见 数据模型)。status 字段变为 paused。
POST
/api/open/outbound-tasks/:uuid/resume恢复已暂停的外呼任务。仅 paused 状态的任务可操作。
路径参数
uuidstring必填任务 UUID
data 返回更新后的任务对象,结构同 OutboundTaskResponse。status 字段变为 running 或 pending。
POST
/api/open/outbound-tasks/:uuid/cancel取消外呼任务。completed 和 cancelled 状态的任务不可操作。
路径参数
uuidstring必填任务 UUID
data 返回更新后的任务对象,结构同 OutboundTaskResponse。status 字段变为 cancelled。
GET
/api/open/outbound-tasks/:uuid/items查询外呼任务的呼叫条目列表,支持分页和关键词搜索。
路径参数
uuidstring必填任务 UUID
查询参数
pageint可选页码,默认 1
page_sizeint可选每页数量,默认 20
keywordstring可选按姓名或电话搜索
POST
/api/open/outbound-tasks/:uuid/items向已有外呼任务追加导入呼叫条目。
路径参数
uuidstring必填任务 UUID
请求参数
itemsarray必填呼叫条目列表(字段同创建任务的 items)
data 返回更新后的任务对象,结构同 OutboundTaskResponse。total_count 反映追加后的总条目数。