新增钉钉待办任务
POST
/v1.0/todo/users/{unionId}/tasks最后修改时间:: 2 年前
责任人: 未设置
说明
调用本接口发起一个钉钉待办任务。
服务地址:api.dingtalk.com
权限
要调用此API,需要以下权限之一。
应用类型 | 是否支持 | 权限 | API Explorer调试 |
---|---|---|---|
企业内部应用 | 支持 | 待办应用中待办写权限 | API Explorer |
第三方企业应用 | 支持 | 待办应用中待办写权限 | API Explorer |
第三方个人应用 | 暂不支持 | 待办应用中待办写权限 | 暂不支持 |
错误码
HttpCode | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | todo.taskCreate.paramError | todo.taskCreate.paramError | 创建待办参数异常 |
500 | todo.taskCreate.systemError | todo.taskCreate.systemError | 创建待办系统内部异常 |
请求参数
Path 参数
unionId
string
必需
当前访问资源所归属用户的unionId,和创建者的unionId保持一致,可通过根据userid获取用户详情接口获取。
Query 参数
operatorId
string
可选
当前操作者用户的unionId,可通过根据userid获取用户详情接口获取。
Header 参数
x-acs-dingtalk-access-token
string
必需
调用该接口的访问凭证。如何获取不同应用的凭证请参考访问凭证概述。
Body 参数application/json
sourceId
string
可选
业务系统侧的唯一标识ID,即业务ID。
subject
string
待办标题。
creatorId
string
必需
创建者的unionId,可通过根据userid获取用户详情接口获取。
description
string
待办备注描述。
dueTime
integer
可选
截止时间,Unix时间戳,单位毫秒。
executorIds
array[string]
可选
执行者的unionId,可通过根据userid获取用户详情接口获取。
participantIds
array[string]
可选
参与者的unionId,可通过根据userid获取用户详情接口获取。
detailUrl
object
可选
详情页url跳转地址。
appUrl
string
可选
APP端详情页url跳转地址。
如果创建第三方待办时配置了DING通知能力,appUrl需要支持以dingtalk协议打开。
pcUrl
string
可选
PC端详情页url跳转地址。
isOnlyShowExecutor
boolean
可选
生成的待办是否仅展示在执行者的待办列表中。
priority
integer
优先级,取值:
notifyConfigs
object
待办通知配置。
dingNotify
string
可选
DING通知配置,目前仅支持取值为1,表示应用内DING。
示例
{}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
待办ID。
subject
string
待办的标题。
description
string
待办描述。
startTime
integer
可选
开始时间,Unix时间戳,单位毫秒。
dueTime
integer
可选
截止时间,Unix时间戳,单位毫秒。
finishTime
integer
可选
完成时间,Unix时间戳,单位毫秒。
done
boolean
完成状态。
executorIds
array[string]
可选
执行者的unionId。
participantIds
array[string]
可选
参与者的unionId。
detailUrl
object
可选
详情页url跳转地址。
pcUrl
string
可选
PC端详情页url跳转地址。
appUrl
string
可选
APP端详情页url跳转地址。
source
string
业务来源。
sourceId
string
可选
业务系统侧的唯一标识ID,即业务ID。
createdTime
integer
可选
创建时间,Unix时间戳,单位毫秒。
modifiedTime
integer
可选
更新时间,Unix时间戳,单位毫秒。
creatorId
string
可选
创建者的unionId。
modifierId
string
可选
更新者的unionId。
bizTag
string
接入应用标识。
requestId
string
请求ID。
isOnlyShowExecutor
boolean
可选
生成的待办是否仅展示在执行者的待办列表中。
priority
integer
优先级,取值:
notifyConfigs
object
待办通知配置
dingNotify
string
可选
DING通知配置,目前仅支持取值为1,表示应用内DING。
示例
{
"id": "string",
"subject": "string",
"description": "string",
"startTime": 0,
"dueTime": 0,
"finishTime": 0,
"done": true,
"executorIds": [
"string"
],
"participantIds": [
"string"
],
"detailUrl": {
"pcUrl": "string",
"appUrl": "string"
},
"source": "string",
"sourceId": "string",
"createdTime": 0,
"modifiedTime": 0,
"creatorId": "string",
"modifierId": "string",
"bizTag": "string",
"requestId": "string",
"isOnlyShowExecutor": true,
"priority": 0,
"notifyConfigs": {
"dingNotify": "string"
}
}
最后修改时间: 2 年前