任务

创建并分配任务
域名 
 
 https://api.incsapp.com 
 
 请求路由 
 
 /external/tasks 
 
 请求方式 
 
 POST 
 
 请求头 
 
 Content-Type: application/json 
 Authorization: Bearer a06b3b2d7f762.... 
 
 请求参数 
 请求参数列表 
 
 
 
 参数名 
 类型 
 必填 
 描述 
 
 
 
 
 name 
 string 
 是 
 任务名称，限256字符 
 
 
 description 
 string 
 否 
 任务描述，限256字符 
 
 
 task_template_id 
 int 
 否 
 任务模板id 
 
 
 user_phone 
 string 
 是 
 任务对象手机号，必须是区号开头的纯数字格式，例如："6281512341234" 
 
 
 user_name 
 string 
 否 
 任务对象名称 
 
 
 assignee_username 
 string 
 是 
 任务被分配人账号 
 
 
 channels 
 array 
 是 
 任务通讯通道，可多选，通道名+通道授权id 
 
 
 custom_data 
 object 
 否 
 任务模板对应的自定义数据字段值 
 
 
 
 请求示例 
 {
 "name": "8 月催收任务",
 "description": "",
 "task_template_id": 123,
 "user_phone": "628123456789",
 "user_name": "Budi",
 "assignee_username": "agent1",
 "channels": [
 {
 "channel_name": "whatsapp-meta",
 "auth_id": 30058
 },
 {
 "channel_name": "voice",
 "auth_id": 30059
 }
 ],
 "custom_data": {
 "订单号": "ORD-1",
 "金额": "100000"
 }
}
 
 响应 
 成功响应示例 
 {
 "status": "success",
 "code": 200,
 "message": "",
 "data": {
 "id": 3625,
 "creation_id": 181,
 "name": "9 月催收任务",
 "description": "www",
 "channels": [
 {
 "channel_name": "voice",
 "auth_id": 30057,
 "conversation_id": 5580
 },
 {
 "channel_name": "whatsapp-meta",
 "auth_id": 30058,
 "conversation_id": 5581
 }
 ],
 "user_name": "Budi",
 "user_phone": "628123456789",
 "assignee_username": "incs_1",
 "status": 0,
 "task_template_id": 11,
 "custom_data": {
 "date": "2026-09-10",
 "money": "100000",
 "name": "www",
 "number": "432526436436"
 },
 "created_at": "2026-09-14 10:35:13",
 "updated_at": "2026-09-14 10:35:16",
 "logs": []
 },
 "error": {}
}
 
 失败响应示例 
 {
 "status": "error",
 "code": 400,
 "message": "Data error",
 "data": {},
 "error": {}
}

获取任务列表
域名 
 
 https://api.incsapp.com 
 
 请求路由 
 
 /external/tasks 
 
 请求方式 
 
 GET 
 
 请求头 
 
 Content-Type: application/json 
 Authorization: Bearer a06b3b2d7f762.... 
 
 请求参数 
 请求参数列表 
 
 
 
 参数名 
 类型 
 必填 
 描述 
 
 
 
 
 task_id 
 int 
 否 
 查询任务id 
 
 
 creation_id 
 int 
 否 
 查询任务批次id 
 
 
 task_template_id 
 int 
 否 
 按任务模板 id 筛选 
 
 
 status 
 int 
 否 
 任务状态：-1 创建失败 / 0 待处理 / 1 处理中 / 2 已解决 / 3 已取消 / 4 退回待审批 / 5 退回驳回 
 
 
 name 
 string 
 否 
 任务名称搜索 
 
 
 start_at 
 string 
 否 
 按任务创建时间搜索，如 "2026-04-07 17:00:00" 
 
 
 end_at 
 string 
 否 
 按任务创建时间搜索，如 "2026-04-07 18:00:00" 
 
 
 page 
 int 
 否 
 分页页号 
 
 
 page_size 
 int 
 是 
 分页大小，默认20，最大100 
 
 
 
 响应示例 
 {
 "status": "success",
 "code": 200,
 "message": "",
 "data": {
 "total": 1,
 "data": [
 {
 "id": 3622,
 "creation_id": 178,
 "name": "新会话测试",
 "description": "新会话测试",
 "channels": [
 {
 "channel_name": "voice",
 "auth_id": 30078,
 "conversation_id": 5575
 },
 {
 "channel_name": "whatsapp-meta",
 "auth_id": 30058,
 "conversation_id": 5576
 }
 ],
 "user_name": "假人A",
 "user_phone": "628347389124",
 "assignee_username": "incs_1",
 "status": 1,
 "task_template_id": 11,
 "task_template": {
 "id": 11,
 "name": "testing93",
 "language": "en-US",
 "custom_module_id": 18,
 "creator": {
 "id": 1041,
 "username": "test_1",
 "nickname": "测试号1",
 "avatar": ""
 }
 },
 "custom_data": {
 "data": "2026-09-10",
 "money": "100000",
 "name": "www",
 "number": "432526436436"
 },
 "created_at": "2026-09-11 17:20:36",
 "updated_at": "2026-09-11 18:32:51",
 "logs": [
 {
 "id": 10795,
 "type": 1,
 "status": 0,
 "pre_status": 0,
 "assignee_username": "",
 "comment": "",
 "created_at": "2026-09-11 17:20:37",
 "updated_at": "2026-09-11 17:20:37"
 },
 {
 "id": 10796,
 "type": 2,
 "status": 0,
 "pre_status": 0,
 "assignee_username": "incs_1",
 "comment": "",
 "created_at": "2026-09-11 17:20:41",
 "updated_at": "2026-09-11 17:20:41"
 },
 {
 "id": 10801,
 "type": 3,
 "status": 1,
 "pre_status": 0,
 "assignee_username": "incs_1",
 "comment": "",
 "created_at": "2026-09-11 18:32:51",
 "updated_at": "2026-09-11 18:32:51"
 }
 ]
 }
 ]
 },
 "error": {}
}