菜单

创建定时任务

使用说明

创建定时任务

请求说明

POST /api/v1/automation/addTask

请求参数

参数 类型 必需 说明
template_id string 模板ID
template_type int 模板来源(1:官方模板,2:自定义模板)
name string 任务名称
remark string 任务备注
images array 任务数据

images

参数 类型 必需 说明
image_id string 云手机ID
issue_at string 发布时间
config object 数据配置
config.{变量名} object 条件必需 模板变量配置,对象键通常和内部 key 相同

config.{变量名}

参数 类型 必需 说明
key string 模板变量名,例如 Search-Content。
value string/array 变量值,当 key 为 file 时,需传入 数组类型 的 value
type string 参数类型,例如:file 文件,textarea 批量文本,boolean 布尔型,number 数字,string 字符串,excel Excel 上传
required bool 是否必填项, true 必填,false 非必填

请求示例

json 复制代码
{
    "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
                }
            },
            "issue_at": "2025-12-20 14:01"
        }
    ]
}

返回示例

json 复制代码
{
    "code": 200,
    "data": {
        "message": "success"
    },
    "message": "success"
}
上一个
官方模板详情
下一个
创建循环任务
最近修改: 2026-09-16Powered by