更新推送
PATCH
/open-apis/helpdesk/v1/notifications/{notification_id}
自建应用
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 154000 | Bad request, please check your request body | 请求不合法,请检查参数 |
401 | 154001 | Unauthorized, please check you have the correct access | 检查Authorization 和 X-Lark-Helpdesk-Authorization 是否正确,应用和服务台属于同一租户 |
403 | 154003 | Please check you have the correct access | 检查是否申请正确权限 |
404 | 154004 | Resource not found | 资源不存在,请检查ID值 |
405 | 154005 | Method Forbidden | 检查是否有权限创建推送 |
500 | 155000 | Internal error | 内部错误,请联系我们 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://open.feishu.cn/open-apis/helpdesk/v1/notifications/6985032626234982420?user_id_type=open_id' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "6981801914270744596",
"job_name": "测试推送任务",
"status": 0,
"create_user": {
"user_id": "ou_7277fd1262bfafc363d5b2a1f9c2ac90",
"avatar_url": "http://*.com/*.png",
"name": "test"
},
"created_at": "1626332244719",
"update_user": {
"user_id": "ou_7277fd1262bfafc363d5b2a1f9c2ac90",
"avatar_url": "http://*.com/*.png",
"name": "test"
},
"updated_at": "1626332244719",
"target_user_count": 1,
"sent_user_count": 1,
"read_user_count": 1,
"send_at": "1626332244719",
"push_content": "{ \"config\": { \"wide_screen_mode\": true }, \"elements\": [ { \"tag\": \"div\", \"text\": { \"tag\": \"lark_md\", \"content\": \"[飞书](https://www.feishu.cn)整合即时沟通、日历、音视频会议、云文档、云盘、工作台等功能于一体,成就组织和个人,更高效、更愉悦。\" } } ] }",
"push_type": 0,
"push_scope_type": 0,
"new_staff_scope_type": 0,
"new_staff_scope_department_list": [
{
"department_id": "od_7277fd1262bfafc363d5b2a1f9c2ac90",
"name": "测试部门"
}
],
"user_list": [
{
"user_id": "ou_7277fd1262bfafc363d5b2a1f9c2ac90",
"avatar_url": "http://*.com/*.png",
"name": "test"
}
],
"department_list": [
{
"department_id": "od_7277fd1262bfafc363d5b2a1f9c2ac90",
"name": "测试部门"
}
],
"chat_list": [
{
"chat_id": "oc_7277fd1262bfafc363d5b2a1f9c2ac90",
"name": "测试群聊"
}
],
"ext": "{}"
}'
响应示例响应示例
{
"code": 0,
"msg": "success",
"data": {}
}
请求参数
Path 参数
notification_id
string
必需
示例值:
6985032626234982420
Query 参数
user_id_type
string
可选
示例值:
open_id
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-02-02 07:22:07