创建循环任务
POST /api/v1/automation/addPlan
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
| template_id | string | 是 | 模板ID |
| template_type | int | 是 | 模板来源(1:官方模板,2:自定义模板) |
| name | string | 是 | 名称 |
| remark | string | 否 | 备注 |
| images | array | 是 | 任务数据 |
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
| image_id | string | 是 | 云手机ID |
| config | array | 否 | 数据配置 |
| start_at | string | 是 | 开始时间 |
| end_at | string | 是 | 结束时间 |
| execute_type | string | 是 | 执行频率(1:间隔,2:每天, 3:每周,4:每月) |
| gap_time | int | 否 | 间隔时间(execute_type为1必传) |
| execute_time | string | 否 | 执行开始时间(execute_type为2、3、4必传) |
| execute_end_time | string | 否 | 执行结束时间(execute_type为2、3、4且mode为2时必传) |
| mode | int | 否 | 模式(1:单次执行 2:循环执行),execute_type为2、3、4必传) |
| weeks | array | 否 | 周天数(execute_type为3必传) |
| days | array | 否 | 月天数(execute_type为4必传) |
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
| key | string | 是 | key |
| value | string/array | 是 | 值 |
| type | string | 是 | 值类型(file:文件,textarea:批量文本,boolean:布尔型,number:数字,string:字符串,excel:Excel上传) |
| required | bool | 是 | 是否必填项(true:必填,false:非必填) |
{
"template_id": "ncwlP",
"template_type": "2",
"name": "任务名称",
"remark": "备注信息",
"images": [
{
"image_id": "AIZ3k",
"config": {
"file": {
"key": "file",
"value": [ // 有效的图片地址 或 云盘文件ID (已上传到云盘的文件可通过文件列表获取ID)
"L1ZVt", // 云盘文件ID
"https://xxx/xxx.png" // 有效的图片地址
],
"type": "file",
"required": true
},
"text": {
"key": "text",
"value": "123\n456",
"type": "textarea",
"required": true
},
"bool": {
"key": "bool",
"value": "true",
"type": "boolean",
"required": true
},
"age": {
"key": "age",
"value": "18",
"type": "number",
"required": true
},
"name": {
"key": "name",
"value": "duoplus",
"type": "string",
"required": true
},
"email": {
"key": "email",
"value": "email1,email2",
"type": "excel",
"required": false
},
"password": {
"key": "password",
"value": "password1,passowrd2",
"type": "excel",
"required": false
}
},
"start_at": "2025-12-11 17:38",
"end_at": "2025-12-25 18:08",
"execute_type": 4,
"gap_time": 20,
"execute_time": "15:11",
"execute_end_time": "18:00",
"mode": 2,
"weeks":["1","2","3","4","5"],
"days": ["10","15","20","25"]
}
]
}
{
"code": 200,
"data": {
"id": "xxxx"
},
"message": "Success"
}