接口说明

创建一个预测试外呼任务。支持上传Excel号码文件,适用于号码数量超过10000个,小于10000请用JSON格式接口创建

请求参数

参数名 类型 是否必须 说明
service string App.Sip_Yccall.TaskCreat
token string 通过授权接口获取的token
assigntype int 分配类型 1:分机 3:分机组
assignagent string 设置为分机,直接填写分机;设置为群组,填写群组名称
telphone file 模板文件点击页面末尾附件下载
taskscale string 空闲坐席呼叫比 格式 1:1
disnumber string 主叫号码,多个号码用逗号隔开(为空即随机)
stoptime int 呼叫截止时间(时间戳,精确到秒)(默认当前时间戳,大于此时间则不呼)等
taskname string 任务名
calltimes int 重呼次数,不传默认为1,最多只能重呼3次
#### 接口请求示例(PHP)
<?php
    $apiUrl = 'http://dashboard.infin8linx.com/api/predictiveCall/submitTask/file';
    $postFields = [
        'service'   => 'App.Sip_Yccall.TaskCreat',
        'token'     => 'ABCDEFG',
        'assigntype'    => 2,
        'assignagent'   => 'queue-1',
        'telphone'      => new CURLFile('/path/to/your/excel/file.xlsx'),
        'taskscale'     => '1:1',
        'disnumber'     => '',
        'stoptime'      => 1500000000,
        'calltimes'     => 1
    ];
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $apiUrl);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($curl);
    $curlError = curl_error($curl);
    curl_close($curl);
    var_dump($response);
?>

返回数据结构示例

{
    "code": 0,
    "msg": "Task Created",
    "data": {
      "task_id": "20250815104554912",
      "task_name": "test"
    }
}
作者:admin  创建时间:2025-08-18 09:36
最后编辑:admin  更新时间:2025-08-22 11:39