From 58ad09a17c7ace726835630920230c3d3421cfba Mon Sep 17 00:00:00 2001
From: cong-we <76894544+cong-we@users.noreply.github.com>
Date: Sat, 27 Jun 2026 12:57:12 +0000
Subject: [PATCH] feat: add mail user sender controls
---
internal/registry/meta_data.json | 45611 +++++++++++++++++++++++++++++
skills/lark-mail/SKILL.md | 570 +-
2 files changed, 46140 insertions(+), 41 deletions(-)
create mode 100644 internal/registry/meta_data.json
diff --git a/internal/registry/meta_data.json b/internal/registry/meta_data.json
new file mode 100644
index 000000000..b8286d1d9
--- /dev/null
+++ b/internal/registry/meta_data.json
@@ -0,0 +1,45611 @@
+{
+ "services": [
+ {
+ "name": "approval",
+ "version": "v4",
+ "title": "审批 API",
+ "description": "搜索审批定义、获取定义详情、创建实例和管理审批任务",
+ "servicePath": "/open-apis/approval/v4",
+ "resources": {
+ "approvals": {
+ "methods": {
+ "search": {
+ "id": "approvals.search",
+ "path": "approvals/search_launchable",
+ "httpMethod": "POST",
+ "description": "搜索当前用户可发起的审批定义",
+ "requestBody": {
+ "keyword": {
+ "type": "string",
+ "description": "关键词",
+ "required": false,
+ "example": "请假"
+ },
+ "locale": {
+ "type": "string",
+ "description": "语言类型",
+ "required": false,
+ "example": "zh-CN: 中文 en-US: 英文 ja-JP: 日文"
+ },
+ "page_size": {
+ "type": "integer",
+ "description": "分页大小",
+ "required": false,
+ "example": "20",
+ "max": "100",
+ "min": "1"
+ },
+ "page_token": {
+ "type": "string",
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果",
+ "required": false,
+ "example": "ASDJHA1323_sda1JSASDFD"
+ }
+ },
+ "responseBody": {
+ "approvals": {
+ "type": "array",
+ "description": "可发起审批定义列表。",
+ "required": false,
+ "properties": {
+ "approval_code": {
+ "type": "string",
+ "description": "审批定义编码",
+ "required": false,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "approval_name": {
+ "type": "string",
+ "description": "审批定义名称",
+ "required": false,
+ "example": "请假"
+ },
+ "description": {
+ "type": "string",
+ "description": "审批定义描述",
+ "required": false,
+ "example": "请假审批"
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "是否三方定义。false 表示原生审批定义,true 表示三方审批定义。",
+ "required": false
+ },
+ "create_link": {
+ "type": "string",
+ "description": "提单链接,可用于发起审批。",
+ "required": false,
+ "example": "https://www.example.com"
+ }
+ }
+ },
+ "page_token": {
+ "type": "string",
+ "description": "分页标记",
+ "required": false
+ },
+ "has_more": {
+ "type": "boolean",
+ "description": "还有更多数据",
+ "required": false
+ }
+ },
+ "scopes": [
+ "approval:approval:read"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search_launchable&project=approval&resource=approval&version=v4"
+ },
+ "get": {
+ "id": "approvals.get",
+ "path": "approvals/{approval_code}/detail",
+ "httpMethod": "GET",
+ "description": "获取审批定义详情",
+ "parameters": {
+ "approval_code": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "审批定义 Code",
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "locale": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "语言可选值",
+ "default": "",
+ "example": "zh-CN",
+ "options": [
+ {
+ "value": "zh-CN",
+ "description": "中文"
+ },
+ {
+ "value": "en-US",
+ "description": "英文"
+ },
+ {
+ "value": "ja-JP",
+ "description": "日文"
+ },
+ {
+ "value": "zh-HK",
+ "description": "繁体中文(中国香港)"
+ },
+ {
+ "value": "zh-TW",
+ "description": "繁体中文(中国台湾)"
+ },
+ {
+ "value": "de-DE",
+ "description": "德语"
+ },
+ {
+ "value": "es-ES",
+ "description": "西班牙语"
+ },
+ {
+ "value": "fr-FR",
+ "description": "法语"
+ },
+ {
+ "value": "id-ID",
+ "description": "印度尼西亚语"
+ },
+ {
+ "value": "it-IT",
+ "description": "意大利语"
+ },
+ {
+ "value": "ko-KR",
+ "description": "韩语"
+ },
+ {
+ "value": "pt-BR",
+ "description": "葡萄牙语"
+ },
+ {
+ "value": "th-TH",
+ "description": "泰语"
+ },
+ {
+ "value": "vi-VN",
+ "description": "越南语"
+ },
+ {
+ "value": "ms-MY",
+ "description": "马来语"
+ },
+ {
+ "value": "ru-RU",
+ "description": "俄语"
+ }
+ ],
+ "enumName": "GetApprovalV4Locale"
+ }
+ },
+ "parameterOrder": [
+ "approval_code"
+ ],
+ "responseBody": {
+ "approval_name": {
+ "type": "string",
+ "description": "审批名称",
+ "required": true,
+ "example": "Payment"
+ },
+ "form": {
+ "type": "string",
+ "description": "表单定义快照,JSON 字符串,可作为创建审批实例时 form 参数的来源。具体控件 value 的结构可参考审批实例表单控件参数文档。",
+ "required": true,
+ "example": "[{\\\"id\\\": \\\"widget1\\\", \\\"custom_id\\\": \\\"user_name\\\",\\\"name\\\": \\\"Item application\\\",\\\"type\\\": \\\"textarea\\\",\\\"printable\\\": true,\\\"required\\\": true}\\\"]"
+ },
+ "node_list": {
+ "type": "array",
+ "description": "流程节点信息列表,可作为创建审批实例时节点相关参数的来源。",
+ "required": true,
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "节点名称",
+ "required": true,
+ "example": "Approval"
+ },
+ "need_approver": {
+ "type": "boolean",
+ "description": "是否需要发起人自选审批人。true 表示创建审批实例时需要为该节点补充审批人 open_id 列表。",
+ "required": true,
+ "example": "true"
+ },
+ "node_id": {
+ "type": "string",
+ "description": "节点 ID,可作为创建审批实例时节点参数中的 key。",
+ "required": true,
+ "example": "46e6d96cfa756980907209209ec03b64"
+ },
+ "custom_node_id": {
+ "type": "string",
+ "description": "节点自定义 ID,如果没有设置则不返回。创建审批实例时如返回该字段,可优先使用该值作为节点参数中的 key。",
+ "required": false,
+ "example": "46e6d96cfa756980907209209ec03b64"
+ },
+ "node_type": {
+ "type": "string",
+ "description": "审批方式。CC_NODE 表示抄送节点类型。",
+ "required": true,
+ "example": "AND",
+ "options": [
+ {
+ "value": "AND",
+ "description": "会签"
+ },
+ {
+ "value": "OR",
+ "description": "或签"
+ },
+ {
+ "value": "SEQUENTIAL",
+ "description": "依次审批"
+ },
+ {
+ "value": "CC_NODE",
+ "description": "抄送节点"
+ }
+ ],
+ "enum": [
+ "AND",
+ "OR",
+ "SEQUENTIAL",
+ "CC_NODE"
+ ]
+ },
+ "approver_chosen_multi": {
+ "type": "boolean",
+ "description": "是否支持多选:true 表示该节点允许传入多个审批人 open_id;false 表示只允许单个审批人。",
+ "required": true,
+ "example": "false"
+ },
+ "approver_chosen_range": {
+ "type": "array",
+ "description": "发起人自选范围,可用于约束节点审批人的候选范围。",
+ "required": false,
+ "properties": {
+ "approver_range_type": {
+ "type": "integer",
+ "description": "指定范围",
+ "required": false,
+ "example": "2",
+ "options": [
+ {
+ "value": "0",
+ "description": "全公司范围"
+ },
+ {
+ "value": "1",
+ "description": "指定角色范围"
+ },
+ {
+ "value": "2",
+ "description": "指定用户范围"
+ }
+ ],
+ "enum": [
+ "0",
+ "1",
+ "2"
+ ]
+ },
+ "approver_range_ids": {
+ "type": "array",
+ "description": "资源 ID。;- approver_range_type 取值为 0 时,该参数为空。;- approver_range_type 取值为 1 时,该参数取值为角色 ID。;- approver_range_type 取值为 2 时,该参数取值为用户 open_id。",
+ "required": false
+ }
+ }
+ },
+ "require_signature": {
+ "type": "boolean",
+ "description": "是否签名",
+ "required": false,
+ "example": "false"
+ }
+ }
+ }
+ },
+ "scopes": [
+ "approval:approval:read"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=detail&project=approval&resource=approval&version=v4"
+ }
+ }
+ },
+ "instances": {
+ "methods": {
+ "get": {
+ "id": "instances.get",
+ "path": "instances/detail",
+ "httpMethod": "GET",
+ "description": "获取单个审批实例详情",
+ "parameters": {
+ "instance_code": {
+ "type": "string",
+ "location": "query",
+ "required": true,
+ "description": "审批实例 Code",
+ "default": "",
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "locale": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "语言",
+ "default": "",
+ "example": "zh-CN",
+ "options": [
+ {
+ "value": "zh-CN",
+ "description": "中文"
+ },
+ {
+ "value": "en-US",
+ "description": "英文"
+ },
+ {
+ "value": "ja-JP",
+ "description": "日文"
+ },
+ {
+ "value": "zh-HK",
+ "description": "繁体中文(中国香港)"
+ },
+ {
+ "value": "zh-TW",
+ "description": "繁体中文(中国台湾)"
+ },
+ {
+ "value": "de-DE",
+ "description": "德语"
+ },
+ {
+ "value": "es-ES",
+ "description": "西班牙语"
+ },
+ {
+ "value": "fr-FR",
+ "description": "法语"
+ },
+ {
+ "value": "id-ID",
+ "description": "印度尼西亚语"
+ },
+ {
+ "value": "it-IT",
+ "description": "意大利语"
+ },
+ {
+ "value": "ko-KR",
+ "description": "韩语"
+ },
+ {
+ "value": "pt-BR",
+ "description": "葡萄牙语"
+ },
+ {
+ "value": "th-TH",
+ "description": "泰语"
+ },
+ {
+ "value": "vi-VN",
+ "description": "越南语"
+ },
+ {
+ "value": "ms-MY",
+ "description": "马来语"
+ },
+ {
+ "value": "ru-RU",
+ "description": "俄语"
+ }
+ ],
+ "enumName": "GetInstanceV4Locale"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "responseBody": {
+ "definition_name": {
+ "type": "string",
+ "description": "审批名称",
+ "required": true,
+ "example": "Payment"
+ },
+ "start_time": {
+ "type": "string",
+ "description": "审批创建时间",
+ "required": false,
+ "example": "1564590532967"
+ },
+ "end_time": {
+ "type": "string",
+ "description": "审批完成时间,未完成为 0",
+ "required": true,
+ "example": "1564590532967"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "发起审批用户",
+ "required": true,
+ "example": "f3ta757q",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "serial_number": {
+ "type": "string",
+ "description": "审批单编号",
+ "required": true,
+ "example": "202102060002"
+ },
+ "department_id": {
+ "type": "string",
+ "description": "发起审批用户所在部门",
+ "required": true,
+ "example": "123456",
+ "annotations": [
+ "open:x_department_id"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "审批实例状态",
+ "required": true,
+ "example": "PENDING",
+ "options": [
+ {
+ "value": "PENDING",
+ "description": "审批中"
+ },
+ {
+ "value": "APPROVED",
+ "description": "通过"
+ },
+ {
+ "value": "REJECTED",
+ "description": "拒绝"
+ },
+ {
+ "value": "CANCELED",
+ "description": "撤回"
+ },
+ {
+ "value": "DELETED",
+ "description": "删除"
+ }
+ ],
+ "enum": [
+ "PENDING",
+ "APPROVED",
+ "REJECTED",
+ "CANCELED",
+ "DELETED"
+ ],
+ "enumName": "GetInstanceV4Status"
+ },
+ "form": {
+ "type": "string",
+ "description": "json字符串,控件值",
+ "required": true,
+ "example": "[{\\\"id\\\": \\\"widget1\\\",\\\"custom_id\\\": \\\"user_info\\\",\\\"name\\\": \\\"Item application\\\",\\\"type\\\": \\\"textarea\\\"},\\\"value\\\":\\\"aaaa\\\"]"
+ },
+ "tasks": {
+ "type": "array",
+ "description": "审批任务列表",
+ "required": true,
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "审批任务id",
+ "required": true,
+ "example": "1234"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "审批人的用户id,自动通过、自动拒绝 时为空",
+ "required": true,
+ "example": "12345",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "instance 状态",
+ "required": true,
+ "example": "PENDING",
+ "options": [
+ {
+ "value": "PENDING",
+ "description": "审批中"
+ },
+ {
+ "value": "APPROVED",
+ "description": "同意"
+ },
+ {
+ "value": "REJECTED",
+ "description": "拒绝"
+ },
+ {
+ "value": "TRANSFERRED",
+ "description": "已转交"
+ },
+ {
+ "value": "DONE",
+ "description": "完成"
+ }
+ ],
+ "enum": [
+ "PENDING",
+ "APPROVED",
+ "REJECTED",
+ "TRANSFERRED",
+ "DONE"
+ ]
+ },
+ "node_id": {
+ "type": "string",
+ "description": "task 所属节点 id",
+ "required": false,
+ "example": "46e6d96cfa756980907209209ec03b64"
+ },
+ "node_name": {
+ "type": "string",
+ "description": "task 所属节点名称",
+ "required": false,
+ "example": "开始"
+ },
+ "type": {
+ "type": "string",
+ "description": "审批方式",
+ "required": false,
+ "example": "AND",
+ "options": [
+ {
+ "value": "AND",
+ "description": "会签"
+ },
+ {
+ "value": "OR",
+ "description": "或签"
+ },
+ {
+ "value": "AUTO_PASS",
+ "description": "自动通过"
+ },
+ {
+ "value": "AUTO_REJECT",
+ "description": "自动拒绝"
+ },
+ {
+ "value": "SEQUENTIAL",
+ "description": "按顺序"
+ }
+ ],
+ "enum": [
+ "AND",
+ "OR",
+ "AUTO_PASS",
+ "AUTO_REJECT",
+ "SEQUENTIAL"
+ ],
+ "enumName": "TaskType"
+ },
+ "start_time": {
+ "type": "string",
+ "description": "task 开始时间",
+ "required": true,
+ "example": "1564590532967"
+ },
+ "end_time": {
+ "type": "string",
+ "description": "task 完成时间, 未完成为 0",
+ "required": false,
+ "example": "0"
+ }
+ }
+ },
+ "comments": {
+ "type": "array",
+ "description": "评论列表",
+ "required": true,
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "评论 id",
+ "required": true,
+ "example": "1234"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "发表评论用户",
+ "required": true,
+ "example": "f7cb567e",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "comment": {
+ "type": "string",
+ "description": "评论内容",
+ "required": true,
+ "example": "ok"
+ },
+ "create_time": {
+ "type": "string",
+ "description": "评论时间",
+ "required": true,
+ "example": "评论时间"
+ },
+ "files": {
+ "type": "array",
+ "description": "评论附件",
+ "required": false,
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "附件路径",
+ "required": false,
+ "example": "https://p3-approval-sign.byteimg.com/lark-approval-attachment/image/20220714/1/332f3596-0845-4746-a4bc-818d54ad435b.png~tplv-ottatrvjsm-image.image?x-expires=1659033558&x-signature=6edF3k%2BaHeAuvfcBRGOkbckoUl4%3D#.png"
+ },
+ "file_size": {
+ "type": "integer",
+ "description": "附件大小。单位:字节",
+ "required": false,
+ "example": "186823"
+ },
+ "title": {
+ "type": "string",
+ "description": "附件标题",
+ "required": false,
+ "example": "e018906140ed9388234bd03b0.png"
+ },
+ "type": {
+ "type": "string",
+ "description": "附件类别;;- image:图片;- attachment:附件,与上传时选择的类型一致",
+ "required": false,
+ "example": "image"
+ }
+ }
+ }
+ }
+ },
+ "operation_records": {
+ "type": "array",
+ "description": "审批动态",
+ "required": true,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "事件类型",
+ "required": true,
+ "example": "PASS",
+ "options": [
+ {
+ "value": "START",
+ "description": "审批开始"
+ },
+ {
+ "value": "PASS",
+ "description": "通过"
+ },
+ {
+ "value": "REJECT",
+ "description": "拒绝"
+ },
+ {
+ "value": "AUTO_PASS",
+ "description": "自动通过"
+ },
+ {
+ "value": "AUTO_REJECT",
+ "description": "自动拒绝"
+ },
+ {
+ "value": "REMOVE_REPEAT",
+ "description": "去重"
+ },
+ {
+ "value": "TRANSFER",
+ "description": "转交"
+ },
+ {
+ "value": "ADD_APPROVER_BEFORE",
+ "description": "前加签"
+ },
+ {
+ "value": "ADD_APPROVER",
+ "description": "并加签"
+ },
+ {
+ "value": "ADD_APPROVER_AFTER",
+ "description": "后加签"
+ },
+ {
+ "value": "DELETE_APPROVER",
+ "description": "减签"
+ },
+ {
+ "value": "ROLLBACK_SELECTED",
+ "description": "指定回退"
+ },
+ {
+ "value": "ROLLBACK",
+ "description": "全部回退"
+ },
+ {
+ "value": "CANCEL",
+ "description": "撤回"
+ },
+ {
+ "value": "DELETE",
+ "description": "删除"
+ },
+ {
+ "value": "CC",
+ "description": "抄送"
+ }
+ ],
+ "enum": [
+ "START",
+ "PASS",
+ "REJECT",
+ "AUTO_PASS",
+ "AUTO_REJECT",
+ "REMOVE_REPEAT",
+ "TRANSFER",
+ "ADD_APPROVER_BEFORE",
+ "ADD_APPROVER",
+ "ADD_APPROVER_AFTER",
+ "DELETE_APPROVER",
+ "ROLLBACK_SELECTED",
+ "ROLLBACK",
+ "CANCEL",
+ "DELETE",
+ "CC"
+ ],
+ "enumName": "EventType"
+ },
+ "create_time": {
+ "type": "string",
+ "description": "发生时间",
+ "required": true,
+ "example": "1564590532967"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "动态产生用户",
+ "required": false,
+ "example": "123456789",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "cc_user_ids": {
+ "type": "array",
+ "description": "被抄送人列表",
+ "required": false
+ },
+ "task_id": {
+ "type": "string",
+ "description": "产生动态关联的task_id",
+ "required": false,
+ "example": "1234"
+ },
+ "comment": {
+ "type": "string",
+ "description": "理由",
+ "required": false,
+ "example": "ok"
+ },
+ "node_id": {
+ "type": "string",
+ "description": "产生task的节点key",
+ "required": false,
+ "example": "APPROVAL_240330_4058663"
+ },
+ "files": {
+ "type": "array",
+ "description": "审批附件",
+ "required": false,
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "附件路径",
+ "required": false,
+ "example": "https://p3-approval-sign.byteimg.com/lark-approval-attachment/image/20220714/1/332f3596-0845-4746-a4bc-818d54ad435b.png~tplv-ottatrvjsm-image.image?x-expires=1659033558&x-signature=6edF3k%2BaHeAuvfcBRGOkbckoUl4%3D#.png"
+ },
+ "file_size": {
+ "type": "integer",
+ "description": "附件大小。单位:字节",
+ "required": false,
+ "example": "186823"
+ },
+ "title": {
+ "type": "string",
+ "description": "附件标题",
+ "required": false,
+ "example": "e018906140ed9388234bd03b0.png"
+ },
+ "type": {
+ "type": "string",
+ "description": "附件类别;;- image:图片;- attachment:附件,与上传时选择的类型一致",
+ "required": false,
+ "example": "image"
+ }
+ }
+ }
+ }
+ },
+ "definition_code": {
+ "type": "string",
+ "description": "审批定义 Code",
+ "required": true,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "reverted": {
+ "type": "boolean",
+ "description": "单据是否被撤销",
+ "required": false,
+ "example": "单据是否被撤销"
+ },
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "current_nodes": {
+ "type": "array",
+ "description": "当前审批节点",
+ "required": false,
+ "properties": {
+ "node_id": {
+ "type": "string",
+ "description": "当前审批节点 id",
+ "required": false,
+ "example": "46e6d96cfa756980907209209ec03b64"
+ },
+ "node_name": {
+ "type": "string",
+ "description": "当前审批节点名称",
+ "required": false,
+ "example": "开始"
+ },
+ "type": {
+ "type": "string",
+ "description": "审批方式",
+ "required": false,
+ "example": "AND",
+ "options": [
+ {
+ "value": "AND",
+ "description": "会签"
+ },
+ {
+ "value": "OR",
+ "description": "或签"
+ },
+ {
+ "value": "AUTO_PASS",
+ "description": "自动通过"
+ },
+ {
+ "value": "AUTO_REJECT",
+ "description": "自动拒绝"
+ },
+ {
+ "value": "SEQUENTIAL",
+ "description": "按顺序"
+ }
+ ],
+ "enum": [
+ "AND",
+ "OR",
+ "AUTO_PASS",
+ "AUTO_REJECT",
+ "SEQUENTIAL"
+ ],
+ "enumName": "TaskType"
+ },
+ "approvers": {
+ "type": "array",
+ "description": "当前节点审批人",
+ "required": false,
+ "properties": {
+ "task_id": {
+ "type": "string",
+ "description": "任务ID",
+ "required": false,
+ "example": "123456789"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "任务对应的userID",
+ "required": false,
+ "annotations": [
+ "open:x_user_id"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "scopes": [
+ "approval:instance:read"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=detail&project=approval&resource=instance&version=v4"
+ },
+ "create": {
+ "id": "instances.create",
+ "path": "instances/initiate",
+ "httpMethod": "POST",
+ "description": "创建审批实例",
+ "requestBody": {
+ "approval_code": {
+ "type": "string",
+ "description": "审批定义 Code",
+ "required": true,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "form": {
+ "type": "string",
+ "description": "填写的审批表单控件值,JSON 数组,传值时需要压缩转义为字符串。该字段可根据审批定义详情中的 form 组装;具体控件 value 的结构可参考审批实例表单控件参数文档。",
+ "required": false,
+ "example": "[{\"id\":\"111\", \"type\": \"input\", \"value\":\"test\"}]"
+ },
+ "node_approver_list": {
+ "type": "array",
+ "description": "用于填写节点审批人。每项 key 对应节点 custom_node_id 或 node_id,value 为审批人 open_id 列表。",
+ "required": false,
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "节点参数 key,可填写审批定义详情中返回的 custom_node_id 或 node_id;若两者都返回,优先使用 custom_node_id。",
+ "required": false,
+ "example": "manager_node_id"
+ },
+ "value": {
+ "type": "array",
+ "description": "审批人 open_id 列表。",
+ "required": false,
+ "example": "ou_125b59ba923ce1b64c7aa6d8257e43cf"
+ }
+ }
+ },
+ "node_cc_list": {
+ "type": "array",
+ "description": "用于填写节点抄送人。每项 key 对应节点 custom_node_id 或 node_id,value 为抄送人 open_id 列表。",
+ "required": false,
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "节点参数 key,可填写审批定义详情中返回的 custom_node_id 或 node_id;若两者都返回,优先使用 custom_node_id。",
+ "required": false,
+ "example": "manager_node_id"
+ },
+ "value": {
+ "type": "array",
+ "description": "抄送人 open_id 列表。",
+ "required": false,
+ "example": "ou_125b59ba923ce1b64c7aa6d8257e43cf"
+ }
+ }
+ },
+ "uuid": {
+ "type": "string",
+ "description": "审批实例 uuid,用于幂等操作,单个企业内的唯一 key。同一个 uuid 只能用于创建一个审批实例,如果冲突则创建失败并返回错误码 60012 ,格式建议为 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,不区分大小写",
+ "required": false,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A87"
+ }
+ },
+ "responseBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "instance_link": {
+ "type": "string",
+ "description": "审批实例链接",
+ "required": true,
+ "example": "https://go.feishu.cn/approval/s/iu848mdm/"
+ }
+ },
+ "scopes": [
+ "approval:instance:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=initiate&project=approval&resource=instance&version=v4"
+ },
+ "cancel": {
+ "id": "instances.cancel",
+ "path": "instances/recall",
+ "httpMethod": "POST",
+ "description": "撤回审批实例",
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ }
+ },
+ "scopes": [
+ "approval:instance:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recall&project=approval&resource=instance&version=v4"
+ },
+ "cc": {
+ "id": "instances.cc",
+ "path": "instances/add_cc",
+ "httpMethod": "POST",
+ "description": "抄送审批实例",
+ "parameters": {
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "cc_user_ids": {
+ "type": "array",
+ "description": "抄送人的用户 ID 列表",
+ "required": true
+ },
+ "comment": {
+ "type": "string",
+ "description": "抄送留言",
+ "required": false,
+ "example": "同意"
+ }
+ },
+ "scopes": [
+ "approval:instance:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_cc&project=approval&resource=instance&version=v4"
+ },
+ "initiated": {
+ "id": "instances.initiated",
+ "path": "instances/initiated",
+ "httpMethod": "GET",
+ "description": "查询用户的已发起列表",
+ "parameters": {
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "分页大小",
+ "default": ""
+ },
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果",
+ "default": ""
+ },
+ "locale": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "语言",
+ "default": "",
+ "example": "zh-CN",
+ "options": [
+ {
+ "value": "zh-CN",
+ "description": "中文"
+ },
+ {
+ "value": "en-US",
+ "description": "英文"
+ },
+ {
+ "value": "ja-JP",
+ "description": "日文"
+ }
+ ]
+ },
+ "definition_code": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "审批定义 Code",
+ "default": "",
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "responseBody": {
+ "instances": {
+ "type": "array",
+ "description": "任务列表",
+ "required": true,
+ "properties": {
+ "instance_status": {
+ "type": "string",
+ "description": "审批实例状态",
+ "required": true,
+ "example": "Running",
+ "options": [
+ {
+ "value": "0",
+ "description": "无流程状态,不展示对应标签"
+ },
+ {
+ "value": "1",
+ "description": "流程实例流转中"
+ },
+ {
+ "value": "2",
+ "description": "已通过"
+ },
+ {
+ "value": "3",
+ "description": "已拒绝"
+ },
+ {
+ "value": "4",
+ "description": "已撤销"
+ },
+ {
+ "value": "5",
+ "description": "已终止"
+ }
+ ],
+ "enum": [
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ "enumName": "ProcessStatus"
+ },
+ "definition_code": {
+ "type": "string",
+ "description": "审批定义 Code",
+ "required": true,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "initiator": {
+ "type": "string",
+ "description": "发起人 ID",
+ "required": false,
+ "example": "123456",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "initiator_name": {
+ "type": "string",
+ "description": "发起人姓名",
+ "required": false,
+ "example": "张三"
+ },
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "definition_group_id": {
+ "type": "string",
+ "description": "审批定义分组 ID",
+ "required": false,
+ "example": "1234",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "definition_group_name": {
+ "type": "string",
+ "description": "审批定义分组名称",
+ "required": false,
+ "example": "考勤",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "definition_name": {
+ "type": "string",
+ "description": "审批定义名称",
+ "required": false,
+ "example": "加班",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summaries": {
+ "type": "array",
+ "description": "摘要",
+ "required": false,
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "字段key",
+ "required": false,
+ "example": "key"
+ },
+ "value": {
+ "type": "string",
+ "description": "字段value",
+ "required": false,
+ "example": "value"
+ }
+ }
+ },
+ "instance_external_id": {
+ "type": "string",
+ "description": "三方审批实例 ID,仅第三方审批实例存在该字段,需要在当前租户、当前 APP 内唯一",
+ "required": false,
+ "example": "example_instance_id"
+ },
+ "link": {
+ "type": "string",
+ "description": "三方审批跳转链接,用于跳转回三方审批系统查看单据详情",
+ "required": false,
+ "example": "https://www.xxxx.com"
+ }
+ }
+ },
+ "page_token": {
+ "type": "string",
+ "description": "翻页 Token",
+ "required": false,
+ "example": "example_page_token"
+ },
+ "has_more": {
+ "type": "boolean",
+ "description": "是否有更多任务可供拉取",
+ "required": false,
+ "example": "false"
+ },
+ "count": {
+ "type": "integer",
+ "description": "列表计数,只在分页第一页返回,大于等于 100 个任务时将返回 99",
+ "required": false,
+ "example": "10",
+ "max": "999",
+ "min": "0"
+ }
+ },
+ "scopes": [
+ "approval:instance:read"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=initiated&project=approval&resource=instance&version=v4"
+ }
+ }
+ },
+ "tasks": {
+ "methods": {
+ "remind": {
+ "id": "tasks.remind",
+ "path": "instances/remind",
+ "httpMethod": "POST",
+ "description": "催办审批人",
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "task_ids": {
+ "type": "array",
+ "description": "被催办的任务ID",
+ "required": true
+ },
+ "comment": {
+ "type": "string",
+ "description": "评论",
+ "required": false,
+ "example": "同意"
+ }
+ },
+ "scopes": [
+ "approval:instance:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remind&project=approval&resource=instance&version=v4"
+ },
+ "approve": {
+ "id": "tasks.approve",
+ "path": "tasks/pass",
+ "httpMethod": "POST",
+ "description": "同意审批任务",
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "审批任务 ID",
+ "required": true,
+ "example": "123456789"
+ },
+ "form": {
+ "type": "string",
+ "description": "表单数据",
+ "required": false,
+ "example": "[{\"id\":\"user_name\", \"type\": \"input\", \"value\":\"test\"}]"
+ },
+ "comment": {
+ "type": "string",
+ "description": "审批意见",
+ "required": false,
+ "example": "同意"
+ }
+ },
+ "scopes": [
+ "approval:task:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=pass&project=approval&resource=task&version=v4"
+ },
+ "reject": {
+ "id": "tasks.reject",
+ "path": "tasks/refuse",
+ "httpMethod": "POST",
+ "description": "拒绝审批任务",
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "审批任务 ID",
+ "required": true,
+ "example": "123456789"
+ },
+ "comment": {
+ "type": "string",
+ "description": "审批意见",
+ "required": false,
+ "example": "拒绝"
+ }
+ },
+ "scopes": [
+ "approval:task:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=refuse&project=approval&resource=task&version=v4"
+ },
+ "transfer": {
+ "id": "tasks.transfer",
+ "path": "tasks/forward",
+ "httpMethod": "POST",
+ "description": "转交审批任务",
+ "parameters": {
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "81D31358-93AF-92D6-7425-01A5D67C4E71"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "审批任务 ID",
+ "required": true,
+ "example": "123456789"
+ },
+ "transfer_user_id": {
+ "type": "string",
+ "description": "被转交人的用户 ID",
+ "required": true,
+ "example": "123",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "comment": {
+ "type": "string",
+ "description": "审批意见",
+ "required": false,
+ "example": "abc"
+ }
+ },
+ "scopes": [
+ "approval:task:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=approval&resource=task&version=v4"
+ },
+ "query": {
+ "id": "tasks.query",
+ "path": "tasks",
+ "httpMethod": "GET",
+ "description": "查询用户的任务列表",
+ "parameters": {
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "分页大小",
+ "default": "",
+ "example": "10"
+ },
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果",
+ "default": "",
+ "example": "abcdefg"
+ },
+ "topic": {
+ "type": "string",
+ "location": "query",
+ "required": true,
+ "description": "需要查询的任务分组主题,如「待办」、「已办」等",
+ "default": "",
+ "example": "1",
+ "options": [
+ {
+ "value": "1",
+ "description": "待办审批"
+ },
+ {
+ "value": "2",
+ "description": "已办审批"
+ },
+ {
+ "value": "3",
+ "description": "已发起审批"
+ },
+ {
+ "value": "17",
+ "description": "未读知会"
+ },
+ {
+ "value": "18",
+ "description": "已读知会"
+ }
+ ],
+ "enumName": "Topic"
+ },
+ "locale": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "语言",
+ "default": "",
+ "example": "zh-CN",
+ "options": [
+ {
+ "value": "zh-CN",
+ "description": "中文"
+ },
+ {
+ "value": "en-US",
+ "description": "英文"
+ },
+ {
+ "value": "ja-JP",
+ "description": "日文"
+ }
+ ]
+ },
+ "definition_code": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "审批定义 Code",
+ "default": "",
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "responseBody": {
+ "tasks": {
+ "type": "array",
+ "description": "任务列表",
+ "required": true,
+ "properties": {
+ "topic": {
+ "type": "string",
+ "description": "任务所属的任务分组,如「待办」、「已办」等",
+ "required": true,
+ "options": [
+ {
+ "value": "1",
+ "description": "待办"
+ },
+ {
+ "value": "2",
+ "description": "已办"
+ },
+ {
+ "value": "3",
+ "description": "已发起"
+ },
+ {
+ "value": "17",
+ "description": "未读知会"
+ },
+ {
+ "value": "18",
+ "description": "已读知会"
+ }
+ ],
+ "enum": [
+ "1",
+ "2",
+ "3",
+ "17",
+ "18"
+ ],
+ "enumName": "Topic",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "user_id": {
+ "type": "string",
+ "description": "任务所属的用户 ID",
+ "required": true,
+ "example": "123456",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "title": {
+ "type": "string",
+ "description": "任务题目",
+ "required": true,
+ "example": "审批"
+ },
+ "status": {
+ "type": "string",
+ "description": "任务状态",
+ "required": true,
+ "example": "Todo",
+ "options": [
+ {
+ "value": "1",
+ "description": "待办"
+ },
+ {
+ "value": "2",
+ "description": "已办"
+ },
+ {
+ "value": "17",
+ "description": "未读"
+ },
+ {
+ "value": "18",
+ "description": "已读"
+ },
+ {
+ "value": "33",
+ "description": "处理中,标记完成用"
+ },
+ {
+ "value": "34",
+ "description": "撤回"
+ }
+ ],
+ "enum": [
+ "1",
+ "2",
+ "17",
+ "18",
+ "33",
+ "34"
+ ],
+ "enumName": "TaskStatus"
+ },
+ "instance_status": {
+ "type": "string",
+ "description": "审批实例状态",
+ "required": true,
+ "example": "Running",
+ "options": [
+ {
+ "value": "0",
+ "description": "无流程状态,不展示对应标签"
+ },
+ {
+ "value": "1",
+ "description": "流程实例流转中"
+ },
+ {
+ "value": "2",
+ "description": "已通过"
+ },
+ {
+ "value": "3",
+ "description": "已拒绝"
+ },
+ {
+ "value": "4",
+ "description": "已撤销"
+ },
+ {
+ "value": "5",
+ "description": "已终止"
+ }
+ ],
+ "enum": [
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ "enumName": "ProcessStatus"
+ },
+ "definition_code": {
+ "type": "string",
+ "description": "审批定义 Code",
+ "required": true,
+ "example": "7C468A54-8745-2245-9675-08B7C63E7A85"
+ },
+ "initiator": {
+ "type": "string",
+ "description": "发起人 ID",
+ "required": false,
+ "example": "123456",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "initiator_name": {
+ "type": "string",
+ "description": "发起人姓名",
+ "required": false,
+ "example": "张三"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "任务 ID,全局唯一",
+ "required": true,
+ "example": "1234"
+ },
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例 Code",
+ "required": true,
+ "example": "ABC"
+ },
+ "definition_group_id": {
+ "type": "string",
+ "description": "审批定义分组 ID",
+ "required": false,
+ "example": "1234",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "definition_group_name": {
+ "type": "string",
+ "description": "审批定义分组名称",
+ "required": false,
+ "example": "加班",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "definition_name": {
+ "type": "string",
+ "description": "审批定义名称",
+ "required": false,
+ "example": "加班",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summaries": {
+ "type": "array",
+ "description": "摘要",
+ "required": false,
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "字段key",
+ "required": false,
+ "example": "key"
+ },
+ "value": {
+ "type": "string",
+ "description": "字段value",
+ "required": false,
+ "example": "value"
+ }
+ }
+ },
+ "instance_external_id": {
+ "type": "string",
+ "description": "三方审批实例 ID,仅第三方审批实例存在该字段,需要在当前租户、当前 APP 内唯一",
+ "required": false,
+ "example": "example_instance_id"
+ },
+ "task_external_id": {
+ "type": "string",
+ "description": "三方任务 ID,仅第三方审批任务存在该字段,需要在当前审批实例内唯一",
+ "required": false,
+ "example": "example_task_id"
+ },
+ "support_api_operate": {
+ "type": "boolean",
+ "description": "是否支持通过api接口同意或拒绝任务",
+ "required": false,
+ "example": "false"
+ },
+ "link": {
+ "type": "string",
+ "description": "三方审批跳转链接,用于跳转回三方审批系统查看单据详情",
+ "required": false,
+ "example": "https://www.xxxx.com"
+ }
+ }
+ },
+ "page_token": {
+ "type": "string",
+ "description": "翻页 Token",
+ "required": false,
+ "example": "example_page_token"
+ },
+ "has_more": {
+ "type": "boolean",
+ "description": "是否有更多任务可供拉取",
+ "required": false,
+ "example": "false"
+ },
+ "count": {
+ "type": "integer",
+ "description": "列表计数,只在分页第一页返回,大于等于 100 个任务时将返回 99",
+ "required": false,
+ "example": "10",
+ "max": "999",
+ "min": "0"
+ }
+ },
+ "scopes": [
+ "approval:task:read"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=approval&resource=task&version=v4"
+ },
+ "add_sign": {
+ "id": "tasks.add_sign",
+ "path": "tasks/add_sign",
+ "httpMethod": "POST",
+ "description": "审批任务加签",
+ "parameters": {
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例code",
+ "required": true,
+ "example": "289330DE-FBF1-4A47-91F9-9EFCCF11BCAE"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "任务id",
+ "required": true,
+ "example": "6955096766400167956"
+ },
+ "comment": {
+ "type": "string",
+ "description": "审批意见",
+ "required": false,
+ "example": "addSignComment"
+ },
+ "add_sign_user_ids": {
+ "type": "array",
+ "description": "被加签人id",
+ "required": true
+ },
+ "add_sign_type": {
+ "type": "integer",
+ "description": "1/2/3分别代表前加签/后加签/并加签",
+ "required": true,
+ "example": "1",
+ "options": [
+ {
+ "value": "1",
+ "description": "前加签"
+ },
+ {
+ "value": "2",
+ "description": "后加签"
+ },
+ {
+ "value": "3",
+ "description": "并加签"
+ }
+ ],
+ "enum": [
+ "1",
+ "2",
+ "3"
+ ],
+ "enumName": "add_sign_enum",
+ "max": "3",
+ "min": "1"
+ },
+ "approval_method": {
+ "type": "integer",
+ "description": "仅在前加签、后加签时需要填写,1/2 分别代表或签/会签",
+ "required": false,
+ "example": "1",
+ "options": [
+ {
+ "value": "1",
+ "description": "或签"
+ },
+ {
+ "value": "2",
+ "description": "会签"
+ },
+ {
+ "value": "3",
+ "description": "依次审批"
+ }
+ ],
+ "enum": [
+ "1",
+ "2",
+ "3"
+ ],
+ "enumName": "approval_method_enum",
+ "max": "3",
+ "min": "1"
+ }
+ },
+ "scopes": [
+ "approval:task:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_sign&project=approval&resource=task&version=v4"
+ },
+ "rollback": {
+ "id": "tasks.rollback",
+ "path": "tasks/rollback",
+ "httpMethod": "POST",
+ "description": "退回审批任务",
+ "requestBody": {
+ "instance_code": {
+ "type": "string",
+ "description": "审批实例code",
+ "required": true,
+ "example": "289330DE-FBF1-4A47-91F9-9EFCCF11BCAE"
+ },
+ "task_id": {
+ "type": "string",
+ "description": "任务id",
+ "required": true,
+ "example": "6955096766400168956"
+ },
+ "comment": {
+ "type": "string",
+ "description": "审批意见",
+ "required": false,
+ "example": "addRollbackComment"
+ },
+ "node_ids": {
+ "type": "array",
+ "description": "节点id",
+ "required": true
+ }
+ },
+ "scopes": [
+ "approval:task:write"
+ ],
+ "accessTokens": [
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=rollback&project=approval&resource=task&version=v4"
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "attendance",
+ "version": "v1",
+ "title": "考勤打卡 API",
+ "description": "attendance record query",
+ "servicePath": "/open-apis/attendance/v1",
+ "resources": {
+ "user_tasks": {
+ "methods": {
+ "query": {
+ "id": "user_task.query",
+ "path": "user_tasks/query",
+ "httpMethod": "POST",
+ "description": "查询打卡结果",
+ "parameters": {
+ "employee_type": {
+ "type": "string",
+ "location": "query",
+ "required": true,
+ "description": "员工ID类型。如果没有后台管理权限,可使用[通过手机号或邮箱获取用户 ID](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch_get_id)",
+ "default": "",
+ "example": "employee_id",
+ "options": [
+ {
+ "value": "employee_id",
+ "description": "员工 employee ID,即[飞书管理后台](https://example.feishu.cn/admin/contacts/departmentanduser) > 组织架构 > 成员与部门 > 成员详情中的用户 ID"
+ },
+ {
+ "value": "employee_no",
+ "description": "员工工号,即[飞书管理后台](https://example.feishu.cn/admin/contacts/departmentanduser) > 组织架构 > 成员与部门 > 成员详情中的工号"
+ }
+ ],
+ "enumName": "GetUserTaskClockInFlowsEmployeeType"
+ },
+ "ignore_invalid_users": {
+ "type": "boolean",
+ "location": "query",
+ "required": false,
+ "description": "是否忽略无效和没有权限的用户,对应employee_type。如果 true,则返回有效用户的信息,并告知无效和没有权限的用户信息;如果 false,且 user_ids 中存在无效或没有权限的用户,则返回错误 (暂不支持该字段);",
+ "default": "",
+ "example": "true"
+ },
+ "include_terminated_user": {
+ "type": "boolean",
+ "location": "query",
+ "required": false,
+ "description": "由于新入职员工可以复用已离职员工的 employee_no/employee_id,对应employee_type。如果 true,则返回 employee_no/employee_id 对应的所有在职 + 离职员工的数据;如果 false,则只返回 employee_no/employee_id 对应的在职或最近一个离职员工的数据",
+ "default": "",
+ "example": "true"
+ }
+ },
+ "requestBody": {
+ "user_ids": {
+ "type": "array",
+ "description": "employee_no 或 employee_id 列表,对应employee_type,长度不超过 50",
+ "required": true
+ },
+ "check_date_from": {
+ "type": "integer",
+ "description": "查询的起始工作日,格式为yyyyMMdd",
+ "required": true,
+ "example": "20190817"
+ },
+ "check_date_to": {
+ "type": "integer",
+ "description": "查询的结束工作日,格式为yyyyMMdd",
+ "required": true,
+ "example": "20190820"
+ },
+ "need_overtime_result": {
+ "type": "boolean",
+ "description": "是否需要加班班段打卡结果;当need_overtime_result=true时,会返回加班班段,加班班段通过task_shift_type=1标识,加班班段上下班与正常班段相连时会出现共用record_id情况。例如:9-18为正常班次,18-19为加班班次,打卡结果中records 会出现两段,分别为9-18,18-19 且两段上下班record_id相同(check_in_record_id和check_out_record_id相同)。非相连加班班次正常分段返回。当need_overtime_result=false时,仅返回正常班段且task_shift_type=0。",
+ "required": false,
+ "example": "true"
+ }
+ },
+ "responseBody": {
+ "user_task_results": {
+ "type": "array",
+ "description": "打卡任务列表",
+ "required": false,
+ "properties": {
+ "result_id": {
+ "type": "string",
+ "description": "打卡记录 ID",
+ "required": true,
+ "example": "6709359313699356941"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户 ID,对应employee_type",
+ "required": true,
+ "example": "abd754f7"
+ },
+ "employee_name": {
+ "type": "string",
+ "description": "用户姓名",
+ "required": true,
+ "example": "张三"
+ },
+ "day": {
+ "type": "integer",
+ "description": "日期,格式为yyyyMMdd",
+ "required": true,
+ "example": "20190819"
+ },
+ "group_id": {
+ "type": "string",
+ "description": "考勤组 ID(特别说明:1代表未加入考勤组),可用于[按 ID 查询考勤组](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/get)",
+ "required": true,
+ "example": "6737202939523236110"
+ },
+ "shift_id": {
+ "type": "string",
+ "description": "班次 ID(特别说明:9代表默认班次),可用于[按 ID 查询班次](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/get)",
+ "required": true,
+ "example": "6753520403404030215"
+ },
+ "records": {
+ "type": "array",
+ "description": "用户考勤记录",
+ "required": true,
+ "properties": {
+ "check_in_record_id": {
+ "type": "string",
+ "description": "上班打卡记录ID",
+ "required": true,
+ "example": "6709359313699356941"
+ },
+ "check_in_record": {
+ "type": "object",
+ "description": "上班打卡记录",
+ "required": false,
+ "ref": "user_flow"
+ },
+ "check_out_record_id": {
+ "type": "string",
+ "description": "下班打卡记录ID",
+ "required": true,
+ "example": "6709359313699356942"
+ },
+ "check_out_record": {
+ "type": "object",
+ "description": "下班打卡记录",
+ "required": false,
+ "ref": "user_flow"
+ },
+ "check_in_result": {
+ "type": "string",
+ "description": "上班打卡结果",
+ "required": true,
+ "example": "SystemCheck",
+ "options": [
+ {
+ "value": "NoNeedCheck",
+ "description": "无需打卡"
+ },
+ {
+ "value": "SystemCheck",
+ "description": "系统打卡(已弃用)"
+ },
+ {
+ "value": "Normal",
+ "description": "正常"
+ },
+ {
+ "value": "Early",
+ "description": "早退"
+ },
+ {
+ "value": "Late",
+ "description": "迟到"
+ },
+ {
+ "value": "Lack",
+ "description": "缺卡"
+ },
+ {
+ "value": "Todo",
+ "description": "未打卡"
+ }
+ ],
+ "enum": [
+ "NoNeedCheck",
+ "SystemCheck",
+ "Normal",
+ "Early",
+ "Late",
+ "Lack",
+ "Todo"
+ ]
+ },
+ "check_out_result": {
+ "type": "string",
+ "description": "下班打卡结果",
+ "required": true,
+ "example": "SystemCheck",
+ "options": [
+ {
+ "value": "NoNeedCheck",
+ "description": "无需打卡"
+ },
+ {
+ "value": "SystemCheck",
+ "description": "系统打卡(已弃用)"
+ },
+ {
+ "value": "Normal",
+ "description": "正常"
+ },
+ {
+ "value": "Early",
+ "description": "早退"
+ },
+ {
+ "value": "Late",
+ "description": "迟到"
+ },
+ {
+ "value": "Lack",
+ "description": "缺卡"
+ },
+ {
+ "value": "Todo",
+ "description": "未打卡"
+ }
+ ],
+ "enum": [
+ "NoNeedCheck",
+ "SystemCheck",
+ "Normal",
+ "Early",
+ "Late",
+ "Lack",
+ "Todo"
+ ]
+ },
+ "check_in_result_supplement": {
+ "type": "string",
+ "description": "上班打卡结果补充",
+ "required": true,
+ "example": "None",
+ "options": [
+ {
+ "value": "None",
+ "description": "无"
+ },
+ {
+ "value": "ManagerModification",
+ "description": "管理员修改"
+ },
+ {
+ "value": "CardReplacement",
+ "description": "补卡通过"
+ },
+ {
+ "value": "ShiftChange",
+ "description": "换班"
+ },
+ {
+ "value": "Travel",
+ "description": "出差"
+ },
+ {
+ "value": "Leave",
+ "description": "请假"
+ },
+ {
+ "value": "GoOut",
+ "description": "外出"
+ },
+ {
+ "value": "CardReplacementApplication",
+ "description": "补卡申请中"
+ },
+ {
+ "value": "FieldPunch",
+ "description": "外勤打卡"
+ }
+ ],
+ "enum": [
+ "None",
+ "ManagerModification",
+ "CardReplacement",
+ "ShiftChange",
+ "Travel",
+ "Leave",
+ "GoOut",
+ "CardReplacementApplication",
+ "FieldPunch"
+ ]
+ },
+ "check_out_result_supplement": {
+ "type": "string",
+ "description": "下班打卡结果补充",
+ "required": true,
+ "example": "None",
+ "options": [
+ {
+ "value": "None",
+ "description": "无"
+ },
+ {
+ "value": "ManagerModification",
+ "description": "管理员修改"
+ },
+ {
+ "value": "CardReplacement",
+ "description": "补卡通过"
+ },
+ {
+ "value": "ShiftChange",
+ "description": "换班"
+ },
+ {
+ "value": "Travel",
+ "description": "出差"
+ },
+ {
+ "value": "Leave",
+ "description": "请假"
+ },
+ {
+ "value": "GoOut",
+ "description": "外出"
+ },
+ {
+ "value": "CardReplacementApplication",
+ "description": "补卡申请中"
+ },
+ {
+ "value": "FieldPunch",
+ "description": "外勤打卡"
+ }
+ ],
+ "enum": [
+ "None",
+ "ManagerModification",
+ "CardReplacement",
+ "ShiftChange",
+ "Travel",
+ "Leave",
+ "GoOut",
+ "CardReplacementApplication",
+ "FieldPunch"
+ ]
+ },
+ "check_in_shift_time": {
+ "type": "string",
+ "description": "上班打卡时间",
+ "required": false,
+ "example": "1609722000"
+ },
+ "check_out_shift_time": {
+ "type": "string",
+ "description": "下班打卡时间",
+ "required": false,
+ "example": "1609754400"
+ },
+ "task_shift_type": {
+ "type": "integer",
+ "description": "班次类型,0正常,1加班班次",
+ "required": false,
+ "example": "0"
+ }
+ }
+ }
+ }
+ },
+ "invalid_user_ids": {
+ "type": "array",
+ "description": "无效用户 ID 列表,对应employee_type",
+ "required": false
+ },
+ "unauthorized_user_ids": {
+ "type": "array",
+ "description": "没有权限用户 ID 列表,对应employee_type",
+ "required": false
+ }
+ },
+ "scopes": [
+ "attendance:task:readonly"
+ ],
+ "accessTokens": [
+ "user",
+ "tenant"
+ ],
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task/query"
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "calendar",
+ "version": "v4",
+ "title": "日历 API",
+ "description": "日程、日历、参会人管理",
+ "servicePath": "/open-apis/calendar/v4",
+ "resources": {
+ "calendars": {
+ "methods": {
+ "create": {
+ "id": "calendar.create",
+ "path": "calendars",
+ "httpMethod": "POST",
+ "description": "创建共享日历",
+ "requestBody": {
+ "summary": {
+ "type": "string",
+ "description": "日历标题。;;**默认值**:空",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。;;**默认值**:空",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。;;**默认值**:show_only_free_busy",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,取值通过颜色 RGB 值的 int32 表示,其中,24 ~ 31 位为透明度,16 ~ 23 位为红,8 ~ 15 位为绿,0 ~ 7 位为蓝。例如,-11034625 表示 RGB 值 (87, 159, 255)。;;**注意**:;- 取值范围为 -2^31 ~ 2^31-1;;- 日历颜色会映射到飞书客户端色板上最接近的一种颜色进行展示。;;- 该颜色仅对当前身份生效。;;**默认值**:-14513409",
+ "required": false,
+ "example": "-1"
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,设置该字段后(包括后续修改该字段)仅对当前身份生效。;;**默认值**:空",
+ "required": false,
+ "example": "日历备注名"
+ }
+ },
+ "responseBody": {
+ "calendar": {
+ "type": "object",
+ "description": "新创建的日历实体信息。",
+ "required": false,
+ "ref": "calendar",
+ "properties": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。后续可以通过该 ID 查询、更新或删除日历信息。更多信息可参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar:create"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/create"
+ },
+ "delete": {
+ "id": "calendar.delete",
+ "path": "calendars/{calendar_id}",
+ "httpMethod": "DELETE",
+ "description": "删除共享日历",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历 ID。;;创建共享日历时会返回日历 ID。你也可以调用以下接口获取某一日历的 ID。;- [查询主日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary);- [查询日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list);- [搜索日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar:delete"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "high-risk-write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/delete"
+ },
+ "get": {
+ "id": "calendar.get",
+ "path": "calendars/{calendar_id}",
+ "httpMethod": "GET",
+ "description": "查询日历信息",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历 ID。;;创建共享日历时会返回日历 ID。你也可以调用以下接口获取某一日历的 ID。;- [查询主日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary);- [查询日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list);- [搜索日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "responseBody": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。后续可以通过该 ID 查询、更新或删除日历信息。更多信息可参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get"
+ },
+ "list": {
+ "id": "calendar.list",
+ "path": "calendars",
+ "httpMethod": "GET",
+ "description": "查询日历列表",
+ "parameters": {
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "一次请求要求返回的最大日历数量。实际返回的日历数量可能小于该值,也可能为空,可以根据响应体里的has_more字段来判断是否还有更多日历。",
+ "default": "500",
+ "example": "`50`",
+ "max": "1000",
+ "min": "50"
+ },
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果",
+ "default": "",
+ "example": "ListCalendarsPageToken_xxx"
+ },
+ "sync_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "增量同步标记,第一次请求不填。当分页查询结束(page_token 返回值为空)时,接口会返回 sync_token 字段,下次调用可使用该 sync_token 增量获取日历变更数据。;;**默认值**:空",
+ "default": "",
+ "example": "ListCalendarsSyncToken_xxx"
+ }
+ },
+ "responseBody": {
+ "has_more": {
+ "type": "boolean",
+ "description": "是否还有更多项",
+ "required": false,
+ "example": "false"
+ },
+ "page_token": {
+ "type": "string",
+ "description": "分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token",
+ "required": false,
+ "example": "ListCalendarsPageToken_xxx"
+ },
+ "sync_token": {
+ "type": "string",
+ "description": "增量同步标记。当 has_more 为 false 时,会同步返回新的 sync_token,下次请求需要带上 sync_token 增量获取日历变更数据。;;**注意**:返回的 sync_token 在 90 天内有效。",
+ "required": false,
+ "example": "ListCalendarsSyncToken_xxx"
+ },
+ "calendar_list": {
+ "type": "array",
+ "description": "分页加载的日历数据列表。",
+ "required": false,
+ "properties": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。后续可以通过该 ID 查询、更新或删除日历信息。更多信息参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar.calendar:readonly",
+ "calendar:calendar:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list"
+ },
+ "patch": {
+ "id": "calendar.patch",
+ "path": "calendars/{calendar_id}",
+ "httpMethod": "PATCH",
+ "description": "更新日历信息",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历 ID。;;创建共享日历时会返回日历 ID。你也可以调用以下接口获取某一日历的 ID。;- [查询主日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary);- [查询日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list);- [搜索日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "requestBody": {
+ "summary": {
+ "type": "string",
+ "description": "日历标题。;- 不传表示不更新该字段。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。;- 不传表示不更新该字段。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。;- 不传表示不更新该字段。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,取值通过颜色 RGB 值的 int32 表示,其中,24 ~ 31 位为透明度,16 ~ 23 位为红,8 ~ 15 位为绿,0 ~ 7 位为蓝。例如,-11034625 表示 RGB 值 (87, 159, 255)。;- 不传表示不更新该字段。;;**注意**:;- 取值范围为 -2^31 ~ 2^31-1;;- 日历颜色会映射到飞书客户端色板上最接近的一种颜色进行展示。;;- 该颜色仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,设置该字段后(包括后续修改该字段)仅对当前身份生效。;- 不传表示不更新该字段。",
+ "required": false,
+ "example": "日历备注名"
+ }
+ },
+ "responseBody": {
+ "calendar": {
+ "type": "object",
+ "description": "更新后的日历实体信息。",
+ "required": false,
+ "ref": "calendar",
+ "properties": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。后续可以通过该 ID 查询、更新或删除日历信息。更多信息参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar:update"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch"
+ },
+ "primary": {
+ "id": "calendar.primary",
+ "path": "calendars/primary",
+ "httpMethod": "POST",
+ "description": "查询主日历信息。推荐使用此 API 获取主日历 ID,无需先 list 再过滤",
+ "parameters": {
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户id"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户id"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户id"
+ }
+ ]
+ }
+ },
+ "responseBody": {
+ "calendars": {
+ "type": "array",
+ "description": "主日历列表。",
+ "required": false,
+ "properties": {
+ "calendar": {
+ "type": "object",
+ "description": "日历实体信息。",
+ "required": false,
+ "ref": "calendar",
+ "properties": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。你可以通过该 ID 查询、更新主日历信息。更多信息可参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "user_id": {
+ "type": "string",
+ "description": "日历创建者的 User ID。了解用户不同类型的 ID,可参见[用户身份概述](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。",
+ "required": false,
+ "example": "ou_xxxxxx"
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar.calendar:readonly",
+ "calendar:calendar:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary"
+ },
+ "search": {
+ "id": "calendar.search",
+ "path": "calendars/search",
+ "httpMethod": "POST",
+ "description": "搜索日历",
+ "parameters": {
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该page_token 获取查询结果",
+ "default": "",
+ "example": "10"
+ },
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "一次请求返回的最大日历数量。",
+ "default": "20",
+ "example": "10",
+ "max": "50"
+ }
+ },
+ "requestBody": {
+ "query": {
+ "type": "string",
+ "description": "搜索关键字。接口将会搜索标题或描述中包含该关键字的公共日历或用户主日历。",
+ "required": true,
+ "example": "query words"
+ }
+ },
+ "responseBody": {
+ "items": {
+ "type": "array",
+ "description": "搜索命中的日历列表。",
+ "required": false,
+ "properties": {
+ "calendar_id": {
+ "type": "string",
+ "description": "日历 ID。后续可以通过该 ID 查询、更新或删除日历信息。更多信息参见[日历 ID 字段说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": true,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日历标题。",
+ "required": false,
+ "example": "测试日历"
+ },
+ "description": {
+ "type": "string",
+ "description": "日历描述。",
+ "required": false,
+ "example": "使用开放接口创建日历"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "日历公开范围。",
+ "required": false,
+ "example": "private",
+ "options": [
+ {
+ "value": "private",
+ "description": "私密"
+ },
+ {
+ "value": "show_only_free_busy",
+ "description": "仅展示忙闲信息"
+ },
+ {
+ "value": "public",
+ "description": "公开,他人可查看日程详情"
+ }
+ ],
+ "enum": [
+ "private",
+ "show_only_free_busy",
+ "public"
+ ],
+ "enumName": "event_permissions"
+ },
+ "color": {
+ "type": "integer",
+ "description": "日历颜色,由颜色 RGB 值的 int32 表示。实际在客户端展示时会映射到色板上最接近的一种颜色,且该字段仅对当前身份生效。",
+ "required": false,
+ "example": "-1"
+ },
+ "type": {
+ "type": "string",
+ "description": "日历类型。",
+ "required": false,
+ "example": "shared",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "primary",
+ "description": "用户或应用的主日历"
+ },
+ {
+ "value": "shared",
+ "description": "由用户或应用创建的共享日历"
+ },
+ {
+ "value": "google",
+ "description": "用户绑定的谷歌日历"
+ },
+ {
+ "value": "resource",
+ "description": "会议室日历"
+ },
+ {
+ "value": "exchange",
+ "description": "用户绑定的 Exchange 日历"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "primary",
+ "shared",
+ "google",
+ "resource",
+ "exchange"
+ ],
+ "enumName": "calendar_type",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary_alias": {
+ "type": "string",
+ "description": "日历备注名,仅对当前身份生效。",
+ "required": false,
+ "example": "日历备注名"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "对于当前身份,日历是否已经被标记为删除。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_third_party": {
+ "type": "boolean",
+ "description": "当前日历是否是第三方数据。三方日历及日程只支持读,不支持写入。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "当前身份对于该日历的访问权限。",
+ "required": false,
+ "example": "owner",
+ "options": [
+ {
+ "value": "unknown",
+ "description": "未知权限"
+ },
+ {
+ "value": "free_busy_reader",
+ "description": "游客,只能看到忙碌、空闲信息"
+ },
+ {
+ "value": "reader",
+ "description": "订阅者,可查看所有日程详情"
+ },
+ {
+ "value": "writer",
+ "description": "编辑者,可创建及修改日程"
+ },
+ {
+ "value": "owner",
+ "description": "管理员,可管理日历及共享设置"
+ }
+ ],
+ "enum": [
+ "unknown",
+ "free_busy_reader",
+ "reader",
+ "writer",
+ "owner"
+ ],
+ "enumName": "calendar_access_role",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "page_token": {
+ "type": "string",
+ "description": "分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token",
+ "required": false,
+ "example": "10"
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search"
+ }
+ }
+ },
+ "event.attendees": {
+ "methods": {
+ "batch_delete": {
+ "id": "calendar.event.attendee.batch_delete",
+ "path": "calendars/{calendar_id}/events/{event_id}/attendees/batch_delete",
+ "httpMethod": "POST",
+ "description": "删除日程参与人",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程对应的日历 ID。了解更多,参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。;;创建日程时会返回日程 ID。你也可以调用以下接口获取某一日历的 ID。;- [获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list);- [搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)",
+ "example": "xxxxxxxxx_0"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户id"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户id"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户id"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "requestBody": {
+ "attendee_ids": {
+ "type": "array",
+ "description": "需要删除的参与人 ID 列表。;;添加日程参与人时,会返回参与人 ID(attendee_id),你也可以调用[获取日程参与人列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list)接口,查询指定日程的参与人 ID。;- 一次最多删除500个参与人(与delete_ids一起计算)",
+ "required": false
+ },
+ "delete_ids": {
+ "type": "array",
+ "description": "参与人类型对应的 ID,该 ID 是 attendee_ids 字段的补充字段。;- 一次最多删除500个参与人(与attendee_ids一起计算)",
+ "required": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户 ID。当选择用户类型参与人(type 取值为 user)时,需要传入该参数。传入的用户 ID 类型需要和 user_id_type 的值保持一致。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组 ID。当选择群组类型参与人(type 取值为 chat)时,需要传入该参数。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室 ID。当选择会议室类型参与人(type 取值为 resource)时,需要传入该参数。",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "邮箱地址。当选择外部邮箱类型参与人(type 取值为 third_party)时,需要传入该参数。",
+ "required": false,
+ "example": "wangwu@email.com"
+ }
+ }
+ },
+ "need_notification": {
+ "type": "boolean",
+ "description": "删除日程参与人时,是否向参与人发送 Bot 通知。;;**可选值有**:;- true(默认值):发送;- false:不发送",
+ "required": false,
+ "example": "false"
+ },
+ "instance_start_time_admin": {
+ "type": "string",
+ "description": "使用管理员身份访问时,要修改的实例(仅用于重复日程修改其中的一个实例,非重复日程无需填此字段)。",
+ "required": false,
+ "example": "1647320400"
+ },
+ "is_enable_admin": {
+ "type": "boolean",
+ "description": "是否启用会议室管理员身份(需先在管理后台设置某人为会议室管理员)。;;**可选值有**:;- true:启用;- false(默认值):不启用",
+ "required": false,
+ "example": "false"
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar.event:writeonly",
+ "calendar:calendar.event:update"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete"
+ },
+ "create": {
+ "id": "calendar.event.attendee.create",
+ "path": "calendars/{calendar_id}/events/{event_id}/attendees",
+ "httpMethod": "POST",
+ "description": "添加日程参与人",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程对应的日历 ID。了解更多,参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。;;创建日程时会返回日程 ID。你也可以调用以下接口获取某一日历的 ID。;- [获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list);- [搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)",
+ "example": "xxxxxxxxx_0"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户id"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户id"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户id"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "requestBody": {
+ "attendees": {
+ "type": "array",
+ "description": "新增参与人列表。;;**注意**:;- 单次请求可设置的参与人数量(含会议室)上限为 1000。;- 单次请求可设置的会议室数量上限为 100。",
+ "required": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加。;;**可选值有**:;- true:是;- false:否;;**注意**:无法编辑会议室类型参与人的此字段。",
+ "required": false,
+ "example": "true"
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户 ID。当选择用户类型参与人(type 取值为 user)时,需要传入该参数。传入的用户 ID 类型需要和 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组 ID。当选择群组类型参与人(type 取值为 chat)时,需要传入该参数。关于群组 ID 可参见[群 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室 ID。当选择会议室类型参与人(type 取值为 resource)时,需要传入该参数。;;你可以通过以下接口获取指定会议室 ID:;;- [查询会议室列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/list);- [搜索会议室](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/search)",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "邮箱地址。当选择外部邮箱类型参与人(type 取值为 third_party)时,需要传入该参数。",
+ "required": false,
+ "example": "wangwu@email.com"
+ },
+ "operate_id": {
+ "type": "string",
+ "description": "会议室联系人 ID。传入的用户 ID 类型需要和 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。;;**说明**:如果当前日程是基于应用身份创建的,则在添加会议室类型参与人时,需要通过该参数指定会议室的联系人,该联系人会在日程会议室信息中展示。;;**默认值**:空",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "resource_customization": {
+ "type": "array",
+ "description": "会议室的个性化配置。;;- 在选择会议室类型参与人时,如果会议室有预定表单,则可以通过该参数配置表单信息。;- 当前添加的参与人不涉及会议室个性化配置时,无需设置该参数。",
+ "required": false,
+ "properties": {
+ "index_key": {
+ "type": "string",
+ "description": "表单内配置的唯一 ID。",
+ "required": true,
+ "example": "16281481596100"
+ },
+ "input_content": {
+ "type": "string",
+ "description": "当配置类型为填空时,需要填入该参数。",
+ "required": false,
+ "example": "xxx"
+ },
+ "options": {
+ "type": "array",
+ "description": "每个配置的选项。",
+ "required": false,
+ "example": "无"
+ }
+ }
+ },
+ "approval_reason": {
+ "type": "string",
+ "description": "申请预定审批会议室的原因。参数配置说明:;- 仅使用用户身份(user_access_token)预定审批会议室时,该字段生效。;- 对于申请预定审批会议室的场景,不传该值会直接预约失败。;- 如果使用应用身份(tenant_access_token)预定审批会议室,会直接失败。;;**默认值**:空",
+ "required": false,
+ "example": "申请原因",
+ "annotations": [
+ "writeOnly"
+ ]
+ }
+ }
+ },
+ "need_notification": {
+ "type": "boolean",
+ "description": "是否给参与人发送 Bot 通知。;;**可选值有**:;- true(默认值):发送;- false:不发送",
+ "required": false,
+ "example": "false"
+ },
+ "instance_start_time_admin": {
+ "type": "string",
+ "description": "使用管理员身份访问时,要修改的日程实例。;;**注意**:;;- 该参数仅用于修改重复日程中的某一日程实例,非重复日程无需填此字段。;- 你可以调用[获取重复日程实例](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/instances)接口,获取重复日程中某一日程实例的 event_id。该参数取值为 event_id 的时间戳后缀。例如查询到的日程实例 ID 为 `2cf525f0-1e67-4b04-ad4d-30b7f003903c_1713168000`,则当前的 `instance_start_time_admin` 取值为 `1713168000`。;;**默认值**:空",
+ "required": false,
+ "example": "1647320400"
+ },
+ "is_enable_admin": {
+ "type": "boolean",
+ "description": "是否启用会议室管理员身份(需先在管理后台设置某成员为会议室管理员)。;;**可选值有**:;- true:启用;- false(默认值):不启用;;**说明**:开启后,本次请求只处理会议室数据,其他参与人操作不会生效。",
+ "required": false,
+ "example": "false"
+ },
+ "add_operator_to_attendee": {
+ "type": "boolean",
+ "description": "是否添加会议室联系人(operate_id)到日程参与人。;;**可选值有**:;- true(默认值):启用;- false:不启用",
+ "required": false,
+ "example": "false"
+ }
+ },
+ "responseBody": {
+ "attendees": {
+ "type": "array",
+ "description": "添加参与人后,日程参与人列表信息。",
+ "required": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "attendee_id": {
+ "type": "string",
+ "description": "参与人 ID。日程参与人在当前日程内的唯一标识,后续可通过该 ID 删除日程参与人,或用于查询群组类型参与人的群成员信息。",
+ "required": false,
+ "example": "user_xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态,即日程回复状态。",
+ "required": false,
+ "example": "accept",
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加,该参数值对群组的群成员不生效。",
+ "required": false,
+ "example": "true"
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。外部参与人不支持编辑。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "张三",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "chat_members": {
+ "type": "array",
+ "description": "群成员,当参与人类型为群组(type 为 chat)时有效。群成员不支持编辑。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态。",
+ "required": false,
+ "example": "accept",
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "张三",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户类型参与人的用户 ID,ID 类型与 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。;;**注意**:当 is_external 返回为 true 时,此字段只会返回 open_id 或者 union_id。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组类型参与人的群组 ID。关于群组 ID 可参见[群 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室类型参与人的会议室 ID。",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "外部邮箱类型参与人的邮箱地址。",
+ "required": false,
+ "example": "wangwu@email.com"
+ },
+ "operate_id": {
+ "type": "string",
+ "description": "如果日程是使用应用身份创建的,在添加会议室时,指定的会议室联系人 ID。ID 类型与 user_id_type 的值保持一致。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "resource_customization": {
+ "type": "array",
+ "description": "会议室的个性化配置。",
+ "required": false,
+ "properties": {
+ "index_key": {
+ "type": "string",
+ "description": "每个配置的唯一 ID。",
+ "required": true,
+ "example": "16281481596100"
+ },
+ "input_content": {
+ "type": "string",
+ "description": "填空类型的取值。",
+ "required": false,
+ "example": "xxx"
+ },
+ "options": {
+ "type": "array",
+ "description": "每个配置的选项。",
+ "required": false,
+ "example": "无"
+ }
+ }
+ },
+ "approval_reason": {
+ "type": "string",
+ "description": "申请预定审批会议室的原因。参数配置说明:;- 仅使用用户身份(user_access_token)预定审批会议室时,该字段生效。;- 对于申请预定审批会议室的场景,不传该值会直接预约失败。;- 如果使用应用身份(tenant_access_token)预定审批会议室,会直接失败。",
+ "required": false,
+ "example": "申请原因",
+ "annotations": [
+ "writeOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar.event:update"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create"
+ },
+ "list": {
+ "id": "calendar.event.attendee.list",
+ "path": "calendars/{calendar_id}/events/{event_id}/attendees",
+ "httpMethod": "GET",
+ "description": "获取日程参与人列表",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程所在的日历 ID。关于日历 ID 可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。;;创建日程时会返回日程 ID。你也可以调用以下接口获取某一日历的 ID。;- [获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list);- [搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)",
+ "example": "xxxxxxxxx_0"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户id"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户id"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户id"
+ }
+ ]
+ },
+ "need_resource_customization": {
+ "type": "boolean",
+ "location": "query",
+ "required": false,
+ "description": "是否需要会议室表单信息。;;**可选值有**:;- true:需要;- false(默认值):不需要;;**注意**:当前身份需要有日程的编辑权限才会返回会议室表单信息,即当前身份需要是日程的组织者,或者是日程参与人且日程设置了**参与人可编辑日程**权限。你可以调用[获取日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/get)接口,获取日程的参与人权限(attendee_ability)。",
+ "default": "",
+ "example": "true"
+ },
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该page_token 获取查询结果",
+ "default": "",
+ "example": "780TRhwXXXXX"
+ },
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "一次请求返回的最大日程参与人数量。最小值为 10,传入小于 10 的值默认按照 10 计算。;",
+ "default": "20",
+ "example": "10",
+ "max": "100"
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "responseBody": {
+ "items": {
+ "type": "array",
+ "description": "日程参与人列表。",
+ "required": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "attendee_id": {
+ "type": "string",
+ "description": "参与人 ID。日程参与人在当前日程内的唯一标识,后续可通过该 ID 删除日程参与人,或用于查询群组类型参与人的群成员信息。",
+ "required": false,
+ "example": "user_xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态,即日程回复状态。",
+ "required": false,
+ "example": "needs_action",
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加,该参数值对群组的群成员不生效。",
+ "required": false,
+ "example": "true"
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。外部参与人不支持编辑。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "Zhang San",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "chat_members": {
+ "type": "array",
+ "description": "群成员信息。;;**注意**:该字段已废弃,如需获取群中的群成员,请使用 [获取参与人群成员列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list)接口。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态。",
+ "required": false,
+ "example": "needs_action",
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "Group",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户类型参与人的用户 ID,ID 类型与 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。;;**注意**:当 is_external 返回为 true 时,此字段只会返回 open_id 或者 union_id。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组类型参与人的群组 ID。关于群组 ID 可参见[群 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室类型参与人的会议室 ID。",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "外部邮箱类型参与人的邮箱地址。",
+ "required": false,
+ "example": "wangwu@email.com"
+ },
+ "operate_id": {
+ "type": "string",
+ "description": "如果日程是使用应用身份创建的,在添加会议室时,指定的会议室联系人 ID。ID 类型与 user_id_type 的值保持一致。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "resource_customization": {
+ "type": "array",
+ "description": "会议室的个性化配置。",
+ "required": false,
+ "properties": {
+ "index_key": {
+ "type": "string",
+ "description": "每个配置的唯一 ID。",
+ "required": true,
+ "example": "16281481596100"
+ },
+ "input_content": {
+ "type": "string",
+ "description": "填空类型的取值。",
+ "required": false,
+ "example": "xxx"
+ },
+ "options": {
+ "type": "array",
+ "description": "每个配置的选项。",
+ "required": false,
+ "example": "无"
+ }
+ }
+ }
+ }
+ },
+ "has_more": {
+ "type": "boolean",
+ "description": "是否还有更多项",
+ "required": false,
+ "example": "true"
+ },
+ "page_token": {
+ "type": "string",
+ "description": "下次请求需要带上的分页标记,90 天有效期",
+ "required": false,
+ "example": "38RTjheyXXXX"
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar.event:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list"
+ }
+ }
+ },
+ "events": {
+ "methods": {
+ "create": {
+ "id": "calendar.event.create",
+ "path": "calendars/{calendar_id}/events",
+ "httpMethod": "POST",
+ "description": "创建日程",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历 ID。;;创建共享日历时会返回日历 ID。你也可以调用以下接口获取某一日历的 ID。;- [查询主日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary);- [查询日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list);- [搜索日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "idempotency_key": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "创建日程的幂等 key,该 key 在应用和日历维度下唯一,用于避免重复创建资源。建议按照示例值的格式进行取值。",
+ "default": "",
+ "example": "25fdf41b-8c80-2ce1-e94c-de8b5e7aa7e6"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "requestBody": {
+ "summary": {
+ "type": "string",
+ "description": "日程标题。;;**注意**:为确保数据安全,系统会自动检测日程标题内容,当包含 **晋升、绩效、述职、调薪、调级、复议、申诉、校准、答辩** 中任一关键词时,该日程不会生成会议纪要。",
+ "required": false,
+ "example": "日程标题"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。支持解析Html标签。;;**注意**:可以通过Html标签来实现部分富文本格式,但是客户端生成的富文本格式并不是通过Html标签实现,如果通过客户端生成富文本描述后,再通过API更新描述,会导致客户端原来的富文本格式丢失。",
+ "required": false,
+ "example": "日程描述"
+ },
+ "need_notification": {
+ "type": "boolean",
+ "description": "更新日程时,是否给日程参与人发送 Bot 通知。;;**可选值有**:;- true:发送通知;- false:不发送通知;;**默认值**:true",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "writeOnly"
+ ]
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。;;**注意**:该参数不能与 `timestamp` 同时指定。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,用于设置具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。;;**注意**:该参数不能与 `date` 同时指定。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准,例如 Asia/Shanghai。;;- 全天日程时区固定为UTC +0;- 非全天日程时区默认为 Asia/Shanghai",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。;;**注意**:该参数不能与 `timestamp` 同时指定。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,用于设置具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。;;**注意**:该参数不能与 `date` 同时指定。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准,例如 Asia/Shanghai。;;- 全天日程时区固定为UTC +0;- 非全天日程时区默认为 Asia/Shanghai",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型。如果无需视频会议,则必须传入 `no_meeting`。;;**默认值**:空,表示在首次添加日程参与人时,会自动生成飞书视频会议 URL。",
+ "required": false,
+ "example": "third_party",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议的 icon 类型。;;**默认值**:default",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。;;**默认值**:空,为空展示默认文案。",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info",
+ "properties": {
+ "unique_id": {
+ "type": "string",
+ "description": "会议唯一ID",
+ "required": true,
+ "example": "7226647229510582291"
+ },
+ "meeting_no": {
+ "type": "string",
+ "description": "会议号",
+ "required": true,
+ "example": "808056935"
+ }
+ }
+ },
+ "meeting_settings": {
+ "type": "object",
+ "description": "飞书视频会议(VC)的会前设置,需满足以下全部条件:;- 当 `vc_type` 为 `vc` 时生效。;- 需要有日程的编辑权限。",
+ "required": false,
+ "ref": "meeting_settings",
+ "properties": {
+ "owner_id": {
+ "type": "string",
+ "description": "设置会议 owner 的用户 ID,ID 类型需和 user_id;_type 保持一致。;;该参数需满足以下全部条件才会生效:;- 应用身份(tenant_access_token)请求,且在应用日历上操作日程。;- 首次将日程设置为 VC 会议时,才能设置owner。;- owner 不能为非用户身份。;- owner 不能为外部租户用户身份。",
+ "required": false,
+ "example": "ou_7d8a6e6df7621556ce0d21922b676706ccs"
+ },
+ "join_meeting_permission": {
+ "type": "string",
+ "description": "设置入会范围。;;**默认值**:anyone_can_join",
+ "required": false,
+ "example": "only_organization_employees",
+ "options": [
+ {
+ "value": "anyone_can_join",
+ "description": "所有人可以加入会议。"
+ },
+ {
+ "value": "only_organization_employees",
+ "description": "仅企业内的用户可以加入会议"
+ },
+ {
+ "value": "only_event_attendees",
+ "description": "仅日程参与者可以加入会议"
+ }
+ ],
+ "enum": [
+ "anyone_can_join",
+ "only_organization_employees",
+ "only_event_attendees"
+ ],
+ "enumName": "join_meeting_permission_type"
+ },
+ "password": {
+ "type": "string",
+ "description": "(灰度中,仅部分租户可见)设置会议密码,仅支持 4-9 位数字",
+ "required": false,
+ "example": "971024"
+ },
+ "assign_hosts": {
+ "type": "array",
+ "description": "通过用户 ID 指定主持人,ID 类型需和 user_id;_type 保持一致。;;**注意**:;- 仅日程组织者可以指定主持人。;- 主持人不能是非用户身份。;- 主持人不能是外部租户用户身份。;- 在应用日历上操作日程时,不允许指定主持人。",
+ "required": false
+ },
+ "auto_record": {
+ "type": "boolean",
+ "description": "是否开启自动录制。;;**可选值有**:;- true:开启;- false(默认值):不开启",
+ "required": false,
+ "example": "false"
+ },
+ "open_lobby": {
+ "type": "boolean",
+ "description": "是否开启等候室。;;**可选值有**:;- true(默认值):开启;- false:不开启",
+ "required": false,
+ "example": "true"
+ },
+ "allow_attendees_start": {
+ "type": "boolean",
+ "description": "是否允许日程参与者发起会议。;;**可选值有**:;- true(默认值):允许;- false:不允许;;**注意**:应用日历上操作日程时,该字段必须为 true,否则没有人能发起会议。",
+ "required": false,
+ "example": "true"
+ }
+ }
+ },
+ "third_party_meeting_settings": {
+ "type": "object",
+ "description": "三方会议设置",
+ "required": false,
+ "ref": "third_party_meeting_settings",
+ "properties": {
+ "meeting_type": {
+ "type": "string",
+ "description": "三方会议类型",
+ "required": false,
+ "example": "julinker"
+ },
+ "meeting_id": {
+ "type": "string",
+ "description": "会议ID",
+ "required": false,
+ "example": "123"
+ },
+ "meeting_no": {
+ "type": "string",
+ "description": "会议号",
+ "required": false,
+ "example": "123"
+ },
+ "password": {
+ "type": "string",
+ "description": "密码",
+ "required": false,
+ "example": "123"
+ },
+ "meeting_descriptions": {
+ "type": "array",
+ "description": "多语言会议描述",
+ "required": false
+ }
+ }
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围,新建日程默认为 `default`。;;**注意**:该参数仅在新建日程时,对所有参与人生效。如果后续更新日程修改了该参数值,则仅对当前身份生效。",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否“忙碌”"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见详情"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。;;**默认值**:none",
+ "required": false,
+ "example": "can_see_others",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态,新建日程默认为 `busy`。;;**注意**:该参数仅在新建日程时,对所有参与人生效。如果后续更新日程时修改了该参数值,则仅对当前身份生效。",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点,不传值则默认为空。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "地点名称"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "地点地址"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准。;- 对于海外的地点,采用 WGS84 标准。",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准。;- 对于海外的地点,采用 WGS84 标准。",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,取值通过颜色 RGB 值的 int32 表示。;;**注意**:;- 该参数仅对当前身份生效。;- 客户端展示时会映射到色板上最接近的一种颜色。;- 取值为 0 或 -1 时,默认跟随日历颜色。",
+ "required": false,
+ "example": "-1"
+ },
+ "reminders": {
+ "type": "array",
+ "description": "日程提醒列表。不传值则默认为空。",
+ "required": false,
+ "properties": {
+ "minutes": {
+ "type": "integer",
+ "description": "日程提醒时间的偏移量。;- 正数时表示在日程开始前 X 分钟提醒。;- 负数时表示在日程开始后 X 分钟提醒。;;**注意**:新建或更新日程时传入该字段,仅对当前身份生效,不会对日程的其他参与人生效。",
+ "required": false,
+ "example": "5",
+ "max": "20160",
+ "min": "-20160"
+ }
+ }
+ },
+ "recurrence": {
+ "type": "string",
+ "description": "重复日程的重复性规则,规则设置方式参考[rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)。;;**默认值**:空,表示当前日程不是重复日程。;;**注意**:;- COUNT 和 ; UNTIL 不支持同时出现。;- 预定会议室重复日程长度不得超过两年。",
+ "required": false,
+ "example": "FREQ=DAILY;INTERVAL=1"
+ },
+ "schemas": {
+ "type": "array",
+ "description": "日程自定义信息,控制日程详情页的 UI 展示。不传值则默认为空。",
+ "required": false,
+ "properties": {
+ "ui_name": {
+ "type": "string",
+ "description": "UI 名称。;;**可选值有**: ;- ForwardIcon:日程转发按钮 ;- MeetingChatIcon:会议群聊按钮 ;- MeetingMinutesIcon:会议纪要按钮 ;- MeetingVideo:视频会议区域 ;- RSVP:接受、拒绝、待定区域 ;- Attendee:参与者区域 ;- OrganizerOrCreator:组织者或创建者区域",
+ "required": false,
+ "example": "ForwardIcon"
+ },
+ "ui_status": {
+ "type": "string",
+ "description": "UI 项的状态。目前只支持选择 `hide`。",
+ "required": false,
+ "example": "hide",
+ "options": [
+ {
+ "value": "hide",
+ "description": "隐藏显示"
+ },
+ {
+ "value": "readonly",
+ "description": "只读"
+ },
+ {
+ "value": "editable",
+ "description": "可编辑"
+ },
+ {
+ "value": "unknown",
+ "description": "未知UI项自定义状态,仅用于读取时兼容"
+ }
+ ],
+ "enum": [
+ "hide",
+ "readonly",
+ "editable",
+ "unknown"
+ ],
+ "enumName": "schema_ui_status"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "按钮点击后跳转的链接。;;**注意**:兼容性参数,只读,因此暂不支持传入该请求参数。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx"
+ }
+ }
+ },
+ "attachments": {
+ "type": "array",
+ "description": "日程附件。",
+ "required": false,
+ "properties": {
+ "file_token": {
+ "type": "string",
+ "description": "附件 Token。调用[上传素材](https://open.larkoffice.com/document/server-docs/docs/drive-v1/media/upload_all)接口,获取附件的 file_token。在调用上传素材接口时需要注意:;;- `parent_type` 需传入固定值 `calendar`。;- `parent_node` 需传入与当前接口一致的日历 ID。;;**附件校验规则**:附件总大小不超过 25 MB。",
+ "required": false,
+ "example": "xAAAAA"
+ }
+ }
+ },
+ "event_check_in": {
+ "type": "object",
+ "description": "日程签到设置,为空则不进行日程签到设置。",
+ "required": false,
+ "ref": "event_check_in",
+ "properties": {
+ "enable_check_in": {
+ "type": "boolean",
+ "description": "是否启用日程签到。",
+ "required": true,
+ "example": "true"
+ },
+ "check_in_start_time": {
+ "type": "object",
+ "description": "日程签到开始时间。;;**注意**:签到开始时间不能大于或者等于签到结束时间。",
+ "required": false,
+ "ref": "check_in_time",
+ "properties": {
+ "time_type": {
+ "type": "string",
+ "description": "偏移量(分钟)相对于的日程时间节点类型。",
+ "required": true,
+ "options": [
+ {
+ "value": "before_event_start",
+ "description": "日程开始前"
+ },
+ {
+ "value": "after_event_start",
+ "description": "日程开始后"
+ },
+ {
+ "value": "after_event_end",
+ "description": "日程结束后"
+ }
+ ],
+ "enum": [
+ "before_event_start",
+ "after_event_start",
+ "after_event_end"
+ ],
+ "enumName": "time_type"
+ },
+ "duration": {
+ "type": "integer",
+ "description": "相对于日程开始或者结束的偏移量(分钟)。;- 目前取值只能为列表[0, 5, 15, 30, 60]之一,0表示立即开始。;- 当time_type为before_event_start,duration不能取0",
+ "required": true,
+ "example": "0",
+ "max": "60",
+ "min": "0"
+ }
+ }
+ },
+ "check_in_end_time": {
+ "type": "object",
+ "description": "日程签到结束时间。;;**注意**:签到开始时间不能大于或者等于签到结束时间。",
+ "required": false,
+ "ref": "check_in_time",
+ "properties": {
+ "time_type": {
+ "type": "string",
+ "description": "偏移量(分钟)相对于的日程时间节点类型。",
+ "required": true,
+ "options": [
+ {
+ "value": "before_event_start",
+ "description": "日程开始前"
+ },
+ {
+ "value": "after_event_start",
+ "description": "日程开始后"
+ },
+ {
+ "value": "after_event_end",
+ "description": "日程结束后"
+ }
+ ],
+ "enum": [
+ "before_event_start",
+ "after_event_start",
+ "after_event_end"
+ ],
+ "enumName": "time_type"
+ },
+ "duration": {
+ "type": "integer",
+ "description": "相对于日程开始或者结束的偏移量(分钟)。;- 目前取值只能为列表[0, 5, 15, 30, 60]之一,0表示立即开始。;- 当time_type为before_event_start,duration不能取0",
+ "required": true,
+ "example": "0",
+ "max": "60",
+ "min": "0"
+ }
+ }
+ },
+ "need_notify_attendees": {
+ "type": "boolean",
+ "description": "签到开始时是否自动发送签到通知给参与者",
+ "required": false
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "日程source",
+ "required": false,
+ "example": "source"
+ }
+ },
+ "responseBody": {
+ "event": {
+ "type": "object",
+ "description": "新创建的日程实体信息。",
+ "required": false,
+ "ref": "calendar.event",
+ "properties": {
+ "event_id": {
+ "type": "string",
+ "description": "日程 ID。后续可通过该 ID 查询、更新或删除日程信息。更多信息参见[日程 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)。",
+ "required": true,
+ "example": "00592a0e-7edf-4678-bc9d-1b77383ef08e_0",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "organizer_calendar_id": {
+ "type": "string",
+ "description": "该日程组织者的日历 ID。关于日历 ID 的说明可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": false,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日程标题。",
+ "required": false,
+ "example": "日程标题"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。",
+ "required": false,
+ "example": "日程描述"
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型,可以为空,表示在首次添加日程参与人时,会自动生成飞书视频会议 URL。",
+ "required": false,
+ "example": "third_party",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议 icon 类型,可以为空,表示展示默认 icon。",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info"
+ },
+ "meeting_settings": {
+ "type": "object",
+ "description": "飞书视频会议(VC)的会前设置。",
+ "required": false,
+ "ref": "meeting_settings"
+ },
+ "third_party_meeting_settings": {
+ "type": "object",
+ "description": "三方会议设置",
+ "required": false,
+ "ref": "third_party_meeting_settings"
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围。新建的日程默认为 `default`,且仅在新建日程时,对所有参与人生效。如果后续更新日程时修改该参数值,则仅对当前身份生效。",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否“忙碌”"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见详情"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。",
+ "required": false,
+ "example": "can_see_others",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态。新建日程默认为 `busy`,且仅新建日程时,对所有参与人生效。如果后续更新日程时修改了该参数值,则仅对当前身份生效。",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "地点名称"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "地点地址"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,由颜色 RGB 值的 int32 表示。;;**说明**:;- 仅对当前身份生效。;- 取值为 0 或 -1 时,表示默认跟随日历颜色。;- 客户端展示时会映射到色板上最接近的一种颜色。",
+ "required": false,
+ "example": "-1"
+ },
+ "reminders": {
+ "type": "array",
+ "description": "日程提醒列表。",
+ "required": false,
+ "properties": {
+ "minutes": {
+ "type": "integer",
+ "description": "日程提醒时间的偏移量。该参数仅对当前身份生效。;;- 正数时表示在日程开始前 X 分钟提醒。;- 负数时表示在日程开始后 X 分钟提醒。",
+ "required": false,
+ "example": "5",
+ "max": "20160",
+ "min": "-20160"
+ }
+ }
+ },
+ "recurrence": {
+ "type": "string",
+ "description": "重复日程的重复性规则,规则格式可参见 [rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)。",
+ "required": false,
+ "example": "FREQ=DAILY;INTERVAL=1"
+ },
+ "status": {
+ "type": "string",
+ "description": "日程状态。",
+ "required": false,
+ "example": "confirmed",
+ "options": [
+ {
+ "value": "tentative",
+ "description": "未回应"
+ },
+ {
+ "value": "confirmed",
+ "description": "已确认"
+ },
+ {
+ "value": "cancelled",
+ "description": "日程已取消"
+ }
+ ],
+ "enum": [
+ "tentative",
+ "confirmed",
+ "cancelled"
+ ],
+ "enumName": "event_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_exception": {
+ "type": "boolean",
+ "description": "日程是否是一个重复日程的例外日程。了解例外日程,可参见[例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "recurring_event_id": {
+ "type": "string",
+ "description": "例外日程对应的原重复日程的 event_id。",
+ "required": false,
+ "example": "1cd45aaa-fa70-4195-80b7-c93b2e208f45",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "create_time": {
+ "type": "string",
+ "description": "日程的创建时间(秒级时间戳)。",
+ "required": false,
+ "example": "1602504000",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "schemas": {
+ "type": "array",
+ "description": "日程自定义信息,控制日程详情页的 UI 展示。",
+ "required": false,
+ "properties": {
+ "ui_name": {
+ "type": "string",
+ "description": "UI 名称。可能值: ;- ForwardIcon:日程转发按钮 ;- MeetingChatIcon:会议群聊按钮 ;- MeetingMinutesIcon:会议纪要按钮 ;- MeetingVideo:视频会议区域 ;- RSVP:接受、拒绝、待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator:组织者或创建者区域",
+ "required": false,
+ "example": "ForwardIcon"
+ },
+ "ui_status": {
+ "type": "string",
+ "description": "UI项自定义状态。",
+ "required": false,
+ "example": "hide",
+ "options": [
+ {
+ "value": "hide",
+ "description": "隐藏显示"
+ },
+ {
+ "value": "readonly",
+ "description": "只读"
+ },
+ {
+ "value": "editable",
+ "description": "可编辑"
+ },
+ {
+ "value": "unknown",
+ "description": "未知UI项自定义状态,仅用于读取时兼容"
+ }
+ ],
+ "enum": [
+ "hide",
+ "readonly",
+ "editable",
+ "unknown"
+ ],
+ "enumName": "schema_ui_status"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "按钮点击后跳转的链接。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx"
+ }
+ }
+ },
+ "event_organizer": {
+ "type": "object",
+ "description": "日程组织者信息。",
+ "required": false,
+ "ref": "event_organizer",
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "user_id": {
+ "type": "string",
+ "description": "日程组织者 user ID。",
+ "required": false,
+ "example": "ou_xxxxxx",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "日程组织者姓名。",
+ "required": false,
+ "example": "李健"
+ }
+ }
+ },
+ "app_link": {
+ "type": "string",
+ "description": "日程的 app_link,用于跳转到具体的某个日程。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "attachments": {
+ "type": "array",
+ "description": "日程附件。",
+ "required": false,
+ "properties": {
+ "file_token": {
+ "type": "string",
+ "description": "附件 Token。调用[上传素材](https://open.larkoffice.com/document/server-docs/docs/drive-v1/media/upload_all)接口,获取附件的 file_token。在调用上传素材接口时需要注意:;;- `parent_type` 需传入固定值 `calendar`。;- `parent_node` 需传入与当前接口一致的日历 ID。;;**附件校验规则**:附件总大小不超过 25 MB。",
+ "required": false,
+ "example": "xAAAAA"
+ },
+ "file_size": {
+ "type": "string",
+ "description": "附件大小",
+ "required": false,
+ "example": "2345",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "是否删除附件",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "writeOnly"
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "附件名称",
+ "required": false,
+ "example": "附件.jpeg",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "event_check_in": {
+ "type": "object",
+ "description": "日程签到设置,为空则不进行日程签到设置。",
+ "required": false,
+ "ref": "event_check_in",
+ "properties": {
+ "enable_check_in": {
+ "type": "boolean",
+ "description": "是否启用日程签到。",
+ "required": true,
+ "example": "true"
+ },
+ "check_in_start_time": {
+ "type": "object",
+ "description": "日程签到开始时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "check_in_end_time": {
+ "type": "object",
+ "description": "日程签到结束时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "need_notify_attendees": {
+ "type": "boolean",
+ "description": "签到开始时是否自动发送签到通知给参与者",
+ "required": false
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "日程source",
+ "required": false,
+ "example": "source"
+ },
+ "self_rsvp_status": {
+ "type": "string",
+ "description": "当前日历的RSVP状态",
+ "required": false,
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar.event:create"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/create"
+ },
+ "delete": {
+ "id": "calendar.event.delete",
+ "path": "calendars/{calendar_id}/events/{event_id}",
+ "httpMethod": "DELETE",
+ "description": "删除日程",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程所在的日历 ID。了解更多,参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。获取方式:;;- [创建日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/create)会返回日程 ID;- [获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list);- [搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)",
+ "example": "xxxxxxxxx_0"
+ },
+ "need_notification": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "删除日程是否给日程参与人发送 Bot 通知。;;**默认值**:true",
+ "default": "",
+ "example": "false",
+ "options": [
+ {
+ "value": "true",
+ "description": "发送"
+ },
+ {
+ "value": "false",
+ "description": "不发送"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar.event:writeonly",
+ "calendar:calendar.event:delete"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/delete"
+ },
+ "get": {
+ "id": "calendar.event.get",
+ "path": "calendars/{calendar_id}/events/{event_id}",
+ "httpMethod": "GET",
+ "description": "获取日程",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程所在的日历 ID。关于日历 ID 可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。;;创建日程时会返回日程 ID。你也可以调用以下接口获取某一日历的 ID。;- [获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list);- [搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)",
+ "example": "xxxxxxxxx_0"
+ },
+ "need_meeting_settings": {
+ "type": "boolean",
+ "location": "query",
+ "required": false,
+ "description": "是否需要返回飞书视频会议(VC)的会前设置。需满足以下条件才可以获取到返回结果:;;- 日程的会议类型(vc_type)需要是 vc。;- 需要有日程的编辑权限。;;;**可选值有**:;- true:需要;- false(默认值):不需要",
+ "default": "",
+ "example": "false"
+ },
+ "need_attendee": {
+ "type": "boolean",
+ "location": "query",
+ "required": false,
+ "description": "是否需要返回参与人信息。;;**可选值有**:;- true:需要;- false(默认值):不需要",
+ "default": "",
+ "example": "false"
+ },
+ "max_attendee_num": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "返回的最大参与人数量。调用[获取日程参与人列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list)可获取日程完整的参与人信息。",
+ "default": "10",
+ "example": "10",
+ "max": "100"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "responseBody": {
+ "event": {
+ "type": "object",
+ "description": "日程的详细信息。",
+ "required": false,
+ "ref": "calendar.event",
+ "properties": {
+ "event_id": {
+ "type": "string",
+ "description": "日程 ID。后续可通过该 ID 查询、更新或删除日程信息。更多信息可参见[日程 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)。",
+ "required": true,
+ "example": "00592a0e-7edf-4678-bc9d-1b77383ef08e_0",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "organizer_calendar_id": {
+ "type": "string",
+ "description": "日程组织者的日历 ID。关于日历 ID 可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": false,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日程标题。",
+ "required": false,
+ "example": "日程标题"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。",
+ "required": false,
+ "example": "日程描述"
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型,可以为空,表示在首次添加日程参与人时,会自动生成飞书视频会议 URL。",
+ "required": false,
+ "example": "third_party",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议 icon 类型,可以为空,表示展示默认 icon。",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info"
+ },
+ "meeting_settings": {
+ "type": "object",
+ "description": "飞书视频会议(VC)的会前设置。",
+ "required": false,
+ "ref": "meeting_settings"
+ },
+ "third_party_meeting_settings": {
+ "type": "object",
+ "description": "三方会议设置",
+ "required": false,
+ "ref": "third_party_meeting_settings"
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围。仅新建日程时对所有参与人生效,之后修改该属性仅对当前身份生效。",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否“忙碌”"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见详情"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。",
+ "required": false,
+ "example": "can_see_others",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态。仅新建日程时对所有参与人生效,之后修改该属性仅对当前身份生效。",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "地点名称"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "地点地址"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,由颜色 RGB 值的 int32 表示。;;**说明**:;- 仅对当前身份生效。;- 取值为 0 或 -1 时,表示默认跟随日历颜色。;- 客户端展示时会映射到色板上最接近的一种颜色。",
+ "required": false,
+ "example": "-1"
+ },
+ "reminders": {
+ "type": "array",
+ "description": "日程提醒列表。",
+ "required": false,
+ "properties": {
+ "minutes": {
+ "type": "integer",
+ "description": "日程提醒时间的偏移量。该参数仅对当前身份生效。;;- 正数时表示在日程开始前 X 分钟提醒。;- 负数时表示在日程开始后 X 分钟提醒。",
+ "required": false,
+ "example": "5",
+ "max": "20160",
+ "min": "-20160"
+ }
+ }
+ },
+ "recurrence": {
+ "type": "string",
+ "description": "重复日程的重复性规则,规则格式可参见 [rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)。",
+ "required": false,
+ "example": "FREQ=DAILY;INTERVAL=1"
+ },
+ "status": {
+ "type": "string",
+ "description": "日程状态。",
+ "required": false,
+ "example": "confirmed",
+ "options": [
+ {
+ "value": "tentative",
+ "description": "未回应"
+ },
+ {
+ "value": "confirmed",
+ "description": "已确认"
+ },
+ {
+ "value": "cancelled",
+ "description": "日程已取消"
+ }
+ ],
+ "enum": [
+ "tentative",
+ "confirmed",
+ "cancelled"
+ ],
+ "enumName": "event_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_exception": {
+ "type": "boolean",
+ "description": "日程是否是一个重复日程的例外日程。了解例外日程,可参见[例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "recurring_event_id": {
+ "type": "string",
+ "description": "例外日程对应的原重复日程的 event_id。",
+ "required": false,
+ "example": "1cd45aaa-fa70-4195-80b7-c93b2e208f45",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "create_time": {
+ "type": "string",
+ "description": "日程的创建时间(秒级时间戳)。",
+ "required": false,
+ "example": "1602504000",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "schemas": {
+ "type": "array",
+ "description": "日程自定义信息,控制日程详情页的 UI 展示。",
+ "required": false,
+ "properties": {
+ "ui_name": {
+ "type": "string",
+ "description": "UI 名称。可能值: ;- ForwardIcon:日程转发按钮 ;- MeetingChatIcon:会议群聊按钮 ;- MeetingMinutesIcon:会议纪要按钮 ;- MeetingVideo:视频会议区域 ;- RSVP:接受、拒绝、待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator:组织者或创建者区域",
+ "required": false,
+ "example": "ForwardIcon"
+ },
+ "ui_status": {
+ "type": "string",
+ "description": "UI 项自定义状态。",
+ "required": false,
+ "example": "hide",
+ "options": [
+ {
+ "value": "hide",
+ "description": "隐藏显示"
+ },
+ {
+ "value": "readonly",
+ "description": "只读"
+ },
+ {
+ "value": "editable",
+ "description": "可编辑"
+ },
+ {
+ "value": "unknown",
+ "description": "未知UI项自定义状态,仅用于读取时兼容"
+ }
+ ],
+ "enum": [
+ "hide",
+ "readonly",
+ "editable",
+ "unknown"
+ ],
+ "enumName": "schema_ui_status"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "按钮点击后跳转的链接。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx"
+ }
+ }
+ },
+ "event_organizer": {
+ "type": "object",
+ "description": "日程组织者信息。",
+ "required": false,
+ "ref": "event_organizer",
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "user_id": {
+ "type": "string",
+ "description": "日程组织者 user ID。",
+ "required": false,
+ "example": "ou_xxxxxx",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "日程组织者姓名。",
+ "required": false,
+ "example": "李健"
+ }
+ }
+ },
+ "app_link": {
+ "type": "string",
+ "description": "日程的 app_link,跳转到具体的某个日程。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "attendees": {
+ "type": "array",
+ "description": "日程参与人信息。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "attendee_id": {
+ "type": "string",
+ "description": "参与人 ID,日程参与人在当前日程内的唯一标识。",
+ "required": false,
+ "example": "user_xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态,即日程回复状态。",
+ "required": false,
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加,该参数值对群组的群成员不生效。",
+ "required": false,
+ "example": "true"
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。外部参与人不支持编辑。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "张三",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "chat_members": {
+ "type": "array",
+ "description": "群中的群成员,当参与人类型(type)为 chat 时有效。群成员不支持编辑。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户类型参与人的用户 ID,ID 类型与 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。;;**注意**:当 is_external 返回为 true 时,此字段只会返回 open_id 或者 union_id。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组类型参与人的群组 ID。关于群组 ID 可参见[群 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室类型参与人的会议室 ID。",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "外部邮箱类型参与人的邮箱地址。",
+ "required": false,
+ "example": "wangwu@email.com"
+ },
+ "operate_id": {
+ "type": "string",
+ "description": "如果日程是使用应用身份创建的,在添加会议室时,指定的会议室联系人 ID。ID 类型与 user_id_type 的值保持一致。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ }
+ }
+ },
+ "has_more_attendee": {
+ "type": "boolean",
+ "description": "是否有更多的参与人。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "attachments": {
+ "type": "array",
+ "description": "日程附件。",
+ "required": false,
+ "properties": {
+ "file_token": {
+ "type": "string",
+ "description": "附件 Token。调用[上传素材](https://open.larkoffice.com/document/server-docs/docs/drive-v1/media/upload_all)接口,获取附件的 file_token。在调用上传素材接口时需要注意:;;- `parent_type` 需传入固定值 `calendar`。;- `parent_node` 需传入与当前接口一致的日历 ID。;;**附件校验规则**:附件总大小不超过 25 MB。",
+ "required": false,
+ "example": "xAAAAA"
+ },
+ "file_size": {
+ "type": "string",
+ "description": "附件大小",
+ "required": false,
+ "example": "2345",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "附件名称",
+ "required": false,
+ "example": "附件.jpeg",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "event_check_in": {
+ "type": "object",
+ "description": "日程签到设置,为空则不进行日程签到设置。",
+ "required": false,
+ "ref": "event_check_in",
+ "properties": {
+ "enable_check_in": {
+ "type": "boolean",
+ "description": "是否启用日程签到。",
+ "required": true,
+ "example": "true"
+ },
+ "check_in_start_time": {
+ "type": "object",
+ "description": "日程签到开始时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "check_in_end_time": {
+ "type": "object",
+ "description": "日程签到结束时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "need_notify_attendees": {
+ "type": "boolean",
+ "description": "签到开始时是否自动发送签到通知给参与者",
+ "required": false
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "日程source",
+ "required": false,
+ "example": "source"
+ },
+ "self_rsvp_status": {
+ "type": "string",
+ "description": "当前日历的RSVP状态",
+ "required": false,
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar.event:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/get"
+ },
+ "instance_view": {
+ "id": "calendar.event.instance_view",
+ "path": "calendars/{calendar_id}/events/instance_view",
+ "httpMethod": "GET",
+ "description": "查询日程视图",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历 ID。关于日历 ID 可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "example": "feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn"
+ },
+ "start_time": {
+ "type": "string",
+ "location": "query",
+ "required": true,
+ "description": "开始时间,Unix 时间戳,单位为秒。该参数与 end_time 用于设置查询的时间范围。;;**注意**:start_time 与 end_time 之间的时间区间需要小于 40 天。",
+ "default": "",
+ "example": "1631777271"
+ },
+ "end_time": {
+ "type": "string",
+ "location": "query",
+ "required": true,
+ "description": "结束时间,Unix 时间戳,单位为秒。该参数与 start_time 用于设置查询的时间范围。;;**注意**:start_time 与 end_time 之间的时间区间需要小于 40 天。",
+ "default": "",
+ "example": "1631777271"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "responseBody": {
+ "items": {
+ "type": "array",
+ "description": "日程 instance 列表。",
+ "required": false,
+ "properties": {
+ "event_id": {
+ "type": "string",
+ "description": "日程 instance ID。后续可通过该 ID 查询、更新或删除日程实例信息。",
+ "required": true,
+ "example": "75d28f9b-e35c-4230-8a83-4a661497db54_1602504000"
+ },
+ "summary": {
+ "type": "string",
+ "description": "日程主题。",
+ "required": false,
+ "example": "日程主题"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。",
+ "required": false,
+ "example": "desc"
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。",
+ "required": false,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。",
+ "required": false,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504400"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "status": {
+ "type": "string",
+ "description": "日程状态。",
+ "required": false,
+ "example": "confirmed",
+ "options": [
+ {
+ "value": "tentative",
+ "description": "未回应"
+ },
+ {
+ "value": "confirmed",
+ "description": "已确认"
+ },
+ {
+ "value": "cancelled",
+ "description": "日程已取消"
+ }
+ ],
+ "enum": [
+ "tentative",
+ "confirmed",
+ "cancelled"
+ ],
+ "enumName": "event_status"
+ },
+ "is_exception": {
+ "type": "boolean",
+ "description": "日程是否是重复日程的例外日程。了解例外日程,可参见[例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)。",
+ "required": false,
+ "example": "false"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "日程的 app_link,用于跳转到具体的某个日程。",
+ "required": false,
+ "example": "https://applink.larkoffice.com/client/calendar/event/detail?calendarId=7039673579105026066&key=aeac9c56-aeb1-4179-a21b-02f278f59048&originalTime=0&startTime=1700496000"
+ },
+ "organizer_calendar_id": {
+ "type": "string",
+ "description": "日程组织者的日历 ID。关于日历 ID 可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": false,
+ "example": "feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn"
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。仅当日程至少有一位参与人时生效。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型。",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议 icon 类型。",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info"
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围。仅新建日程时对所有参与人生效,之后修改该属性仅对当前身份生效。",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否忙碌"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。",
+ "required": false,
+ "example": "none",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态。仅新建日程时对所有参与人生效,之后修改该属性仅对当前身份生效。",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "地点名称"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "地点地址"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,由颜色 RGB 值的 int32 表示。;;**说明**:;- 仅对当前身份生效。;- 取值为 0 或 -1 时,表示默认跟随日历颜色。;- 客户端展示时会映射到色板上最接近的一种颜色。",
+ "required": false,
+ "example": "0"
+ },
+ "recurring_event_id": {
+ "type": "string",
+ "description": "例外日程对应的原重复日程的 event_id。",
+ "required": false,
+ "example": "75d28f9b-e35c-4230-8a83-4a661497db54_0"
+ },
+ "event_organizer": {
+ "type": "object",
+ "description": "日程组织者信息。",
+ "required": false,
+ "ref": "event_organizer",
+ "properties": {
+ "user_id": {
+ "type": "string",
+ "description": "日程组织者 user ID。",
+ "required": false,
+ "example": "ou_xxxxxx",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "日程组织者姓名。",
+ "required": false,
+ "example": "孙二二"
+ }
+ }
+ },
+ "attendees": {
+ "type": "array",
+ "description": "日程参与人信息,当前只返回会议室,需要其他类型参与人信息请使用[获取日程参与人列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list)接口。",
+ "required": false,
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "参与人类型。",
+ "required": false,
+ "example": "user",
+ "options": [
+ {
+ "value": "user",
+ "description": "用户"
+ },
+ {
+ "value": "chat",
+ "description": "群组"
+ },
+ {
+ "value": "resource",
+ "description": "会议室"
+ },
+ {
+ "value": "third_party",
+ "description": "外部邮箱"
+ }
+ ],
+ "enum": [
+ "user",
+ "chat",
+ "resource",
+ "third_party"
+ ],
+ "enumName": "event_attendee_type"
+ },
+ "attendee_id": {
+ "type": "string",
+ "description": "参与人 ID。日程参与人在当前日程内的唯一标识。",
+ "required": false,
+ "example": "user_xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "rsvp_status": {
+ "type": "string",
+ "description": "参与人 RSVP 状态,即日程回复状态。",
+ "required": false,
+ "example": "accept",
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_optional": {
+ "type": "boolean",
+ "description": "参与人是否为可选参加,该参数值对群组的群成员不生效。",
+ "required": false,
+ "example": "true"
+ },
+ "is_organizer": {
+ "type": "boolean",
+ "description": "参与人是否为日程组织者。",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_external": {
+ "type": "boolean",
+ "description": "参与人是否为外部参与人。外部参与人不支持编辑。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "参与人名称。",
+ "required": false,
+ "example": "张三",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "chat_members": {
+ "type": "array",
+ "description": "群中的群成员,当参与人类型(type)为 chat 时有效。群成员不支持编辑。",
+ "required": false,
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "user_id": {
+ "type": "string",
+ "description": "用户类型参与人的用户 ID,ID 类型与 user_id_type 的值保持一致。关于用户 ID 可参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction)。;;**注意**:当 is_external 返回为 true 时,此字段只会返回 open_id 或者 union_id。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "chat_id": {
+ "type": "string",
+ "description": "群组类型参与人的群组 ID。关于群组 ID 可参见[群 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)。",
+ "required": false,
+ "example": "oc_xxxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "room_id": {
+ "type": "string",
+ "description": "会议室类型参与人的会议室 ID。",
+ "required": false,
+ "example": "omm_xxxxxxxx",
+ "annotations": [
+ "open:open_x_id"
+ ]
+ },
+ "third_party_email": {
+ "type": "string",
+ "description": "外部邮箱类型参与人的邮箱地址。",
+ "required": false,
+ "example": "wangwu@email.com"
+ },
+ "operate_id": {
+ "type": "string",
+ "description": "如果日程是使用应用身份创建的,在添加会议室时,指定的会议室联系人 ID。ID 类型与 user_id_type 的值保持一致。",
+ "required": false,
+ "example": "ou_xxxxxxxx"
+ },
+ "resource_customization": {
+ "type": "array",
+ "description": "会议室的个性化配置。",
+ "required": false
+ },
+ "approval_reason": {
+ "type": "string",
+ "description": "会议室的审批原因。",
+ "required": false,
+ "example": "申请原因",
+ "annotations": [
+ "writeOnly"
+ ]
+ }
+ }
+ },
+ "self_rsvp_status": {
+ "type": "string",
+ "description": "当前日历的RSVP状态",
+ "required": false,
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar:readonly",
+ "calendar:calendar",
+ "calendar:calendar.event:read"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "risk": "read",
+ "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=instance_view&project=calendar&resource=calendar.event&version=v4"
+ },
+ "patch": {
+ "id": "calendar.event.patch",
+ "path": "calendars/{calendar_id}/events/{event_id}",
+ "httpMethod": "PATCH",
+ "description": "更新日程",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程所在的日历 ID。ID 获取方式:;;- [创建共享日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/create)时,接口会返回日历 ID。;- 调用[查询主日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary)、[查询日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list)或者[搜索日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)接口,获取所需的日历 ID。;- ",
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"
+ },
+ "event_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日程 ID。ID 获取方式:;;- [创建日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/create)时,接口会返回日程 ID。;- 调用[获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list)或者[搜索日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search)接口,获取所需的日程 ID。",
+ "example": "00592a0e-7edf-4678-bc9d-1b77383ef08e_0"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id",
+ "event_id"
+ ],
+ "requestBody": {
+ "summary": {
+ "type": "string",
+ "description": "日程标题。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "团队周会"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。;;**注意**:目前 API 方式不支持编辑富文本描述。如果日程描述通过客户端编辑为富文本内容,则使用 API 更新描述会导致富文本格式丢失。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "讨论项目进展"
+ },
+ "need_notification": {
+ "type": "boolean",
+ "description": "更新日程时,是否给日程参与人发送 Bot 通知。;;**默认值**:空,表示不更新该字段;;**可选值有**:;- true:发送通知;- false:不发送通知",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "writeOnly"
+ ]
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。需要与end_time同时有值才会生效。",
+ "required": false,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。;;**注意**:该参数不能与 `timestamp` 同时指定。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,用于设置具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。;;**注意**:该参数不能与 `date` 同时指定。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准,例如 Asia/Shanghai。;;- 全天日程时区固定为UTC +0;- 非全天日程时区默认为 Asia/Shanghai",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。需要与start_time同时有值才会生效。",
+ "required": false,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。;;**注意**:该参数不能与 `timestamp` 同时指定。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,用于设置具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。;;**注意**:该参数不能与 `date` 同时指定。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准,例如 Asia/Shanghai。;;- 全天日程时区固定为UTC +0;- 非全天日程时区默认为 Asia/Shanghai",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。不传值则表示不更新该字段。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型。如果无需视频会议,则必须传入 `no_meeting`。",
+ "required": false,
+ "example": "third_party",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议的 icon 类型。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info",
+ "properties": {
+ "unique_id": {
+ "type": "string",
+ "description": "会议唯一ID",
+ "required": true,
+ "example": "7226647229510582291"
+ },
+ "meeting_no": {
+ "type": "string",
+ "description": "会议号",
+ "required": true,
+ "example": "808056935"
+ }
+ }
+ },
+ "meeting_settings": {
+ "type": "object",
+ "description": "飞书视频会议(VC)的会前设置,需满足以下全部条件:;- 当 `vc_type` 为 `vc` 时生效。;- 需要有日程的编辑权限。;;不传值则表示不更新该字段。",
+ "required": false,
+ "ref": "meeting_settings",
+ "properties": {
+ "owner_id": {
+ "type": "string",
+ "description": "设置会议 owner 的用户 ID,ID 类型需和 user_id_type 保持一致。;;该参数需满足以下全部条件才会生效:;- 应用身份(tenant_access_token)请求,且在应用日历上操作日程。;- 首次将日程设置为 VC 会议时,才能设置owner。;- owner 不能为非用户身份。;- owner 不能为外部租户用户身份。",
+ "required": false,
+ "example": "ou_7d8a6e6df7621556ce0d21922b676706ccs"
+ },
+ "join_meeting_permission": {
+ "type": "string",
+ "description": "设置入会范围。",
+ "required": false,
+ "example": "only_organization_employees",
+ "options": [
+ {
+ "value": "anyone_can_join",
+ "description": "所有人可以加入会议。"
+ },
+ {
+ "value": "only_organization_employees",
+ "description": "仅企业内的用户可以加入会议"
+ },
+ {
+ "value": "only_event_attendees",
+ "description": "仅日程参与者可以加入会议"
+ }
+ ],
+ "enum": [
+ "anyone_can_join",
+ "only_organization_employees",
+ "only_event_attendees"
+ ],
+ "enumName": "join_meeting_permission_type"
+ },
+ "password": {
+ "type": "string",
+ "description": "(灰度中,仅部分租户可见)设置会议密码,仅支持 4-9 位数字",
+ "required": false,
+ "example": "971024"
+ },
+ "assign_hosts": {
+ "type": "array",
+ "description": "通过用户 ID 指定主持人,ID 类型需和 user_id;_type 保持一致。;;**注意**:;- 仅日程组织者可以指定主持人。;- 主持人不能是非用户身份。;- 主持人不能是外部租户用户身份。;- 在应用日历上操作日程时,不允许指定主持人。",
+ "required": false
+ },
+ "auto_record": {
+ "type": "boolean",
+ "description": "是否开启自动录制。;;**可选值有**:;- true:开启;- false:不开启;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "false"
+ },
+ "open_lobby": {
+ "type": "boolean",
+ "description": "是否开启等候室。;;**可选值有**:;- true:开启;- false:不开启;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "true"
+ },
+ "allow_attendees_start": {
+ "type": "boolean",
+ "description": "是否允许日程参与者发起会议。;;**注意**:应用日历上操作日程时,该字段必须为 true,否则没有人能发起会议。;;**可选值有**:;- true:允许;- false:不允许;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "true"
+ }
+ }
+ },
+ "third_party_meeting_settings": {
+ "type": "object",
+ "description": "三方会议设置",
+ "required": false,
+ "ref": "third_party_meeting_settings",
+ "properties": {
+ "meeting_type": {
+ "type": "string",
+ "description": "三方会议类型",
+ "required": false,
+ "example": "julinker"
+ },
+ "meeting_id": {
+ "type": "string",
+ "description": "会议ID",
+ "required": false,
+ "example": "123"
+ },
+ "meeting_no": {
+ "type": "string",
+ "description": "会议号",
+ "required": false,
+ "example": "123"
+ },
+ "password": {
+ "type": "string",
+ "description": "密码",
+ "required": false,
+ "example": "123"
+ },
+ "meeting_descriptions": {
+ "type": "array",
+ "description": "多语言会议描述",
+ "required": false
+ }
+ }
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围。;;**注意**:更新日程时如果修改了该参数值,则仅对当前身份生效。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否“忙碌”"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见详情"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "can_see_others",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态,新建日程默认为 `busy`。;;**注意**:更新日程时如果修改了该参数值,则仅对当前身份生效。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点。不传值则表示不更新该字段。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "301会议室"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "公司大楼三层"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准。;- 对于海外的地点,采用 WGS84 标准。",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准。;- 对于海外的地点,采用 WGS84 标准。",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,取值通过颜色 RGB 值的 int32 表示。;;**注意**:;- 该参数仅对当前身份生效。;- 客户端展示时会映射到色板上最接近的一种颜色。;- 取值为 0 或 -1 时,默认跟随日历颜色。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "-1"
+ },
+ "reminders": {
+ "type": "array",
+ "description": "日程提醒列表。不传值则表示不更新该字段。",
+ "required": false,
+ "properties": {
+ "minutes": {
+ "type": "integer",
+ "description": "日程提醒时间的偏移量。;- 正数时表示在日程开始前 X 分钟提醒。;- 负数时表示在日程开始后 X 分钟提醒。;;**注意**:更新日程时修改该字段仅对当前身份生效。",
+ "required": false,
+ "example": "5",
+ "max": "20160",
+ "min": "-20160"
+ }
+ }
+ },
+ "recurrence": {
+ "type": "string",
+ "description": "重复日程的重复性规则,规则设置方式参考[rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)。;;**注意**:;- COUNT 和 UNTIL 不支持同时出现。;- 预定会议室重复日程长度不得超过两年。;;**默认值**:空,表示不更新该字段",
+ "required": false,
+ "example": "FREQ=DAILY;INTERVAL=1"
+ },
+ "schemas": {
+ "type": "array",
+ "description": "日程自定义信息,控制日程详情页的 UI 展示。schemas字段不传值则表示不更新该字段。;;**注意:**;1. schemas传值的情况下,每次都是覆盖更新,即用传入的列表去更新原来的列表。;2. 可以使用[]空列表来清空schemas原来的数据。",
+ "required": false,
+ "properties": {
+ "ui_name": {
+ "type": "string",
+ "description": "UI 名称。;;**可选值有**: ;- ForwardIcon:日程转发按钮 ;- MeetingChatIcon:会议群聊按钮 ;- MeetingMinutesIcon:会议纪要按钮 ;- MeetingVideo:视频会议区域 ;- RSVP:接受、拒绝、待定区域 ;- Attendee:参与者区域 ;- OrganizerOrCreator:组织者或创建者区域",
+ "required": false,
+ "example": "ForwardIcon"
+ },
+ "ui_status": {
+ "type": "string",
+ "description": "UI 项的状态。目前只支持选择 `hide`。",
+ "required": false,
+ "example": "hide",
+ "options": [
+ {
+ "value": "hide",
+ "description": "隐藏显示"
+ },
+ {
+ "value": "readonly",
+ "description": "只读"
+ },
+ {
+ "value": "editable",
+ "description": "可编辑"
+ },
+ {
+ "value": "unknown",
+ "description": "未知UI项自定义状态,仅用于读取时兼容"
+ }
+ ],
+ "enum": [
+ "hide",
+ "readonly",
+ "editable",
+ "unknown"
+ ],
+ "enumName": "schema_ui_status"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "按钮点击后跳转的链接。;;**注意**:兼容性参数,只读,因此暂不支持传入该请求参数。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx"
+ }
+ }
+ },
+ "attachments": {
+ "type": "array",
+ "description": "日程附件。",
+ "required": false,
+ "properties": {
+ "file_token": {
+ "type": "string",
+ "description": "附件 Token。调用[上传素材](https://open.larkoffice.com/document/server-docs/docs/drive-v1/media/upload_all)接口,获取附件的 file_token。在调用上传素材接口时需要注意:;;- `parent_type` 需传入固定值 `calender`。;- `parent_node` 需传入与当前接口一致的日历 ID。;;**附件校验规则**:附件总大小不超过 25 MB。",
+ "required": false,
+ "example": "boxcnrHpsg1QDqXAAAyachaxxxx"
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "是否删除附件。;;**可选值有**: ;- true:删除;- false:不删除;;**默认值**:false",
+ "required": false,
+ "example": "true",
+ "annotations": [
+ "writeOnly"
+ ]
+ }
+ }
+ },
+ "event_check_in": {
+ "type": "object",
+ "description": "日程签到设置,为空则不进行日程签到设置。",
+ "required": false,
+ "ref": "event_check_in",
+ "properties": {
+ "enable_check_in": {
+ "type": "boolean",
+ "description": "是否启用日程签到。",
+ "required": true,
+ "example": "true"
+ },
+ "check_in_start_time": {
+ "type": "object",
+ "description": "日程签到开始时间。;;**注意**:签到开始时间不能大于或者等于签到结束时间。",
+ "required": false,
+ "ref": "check_in_time",
+ "properties": {
+ "time_type": {
+ "type": "string",
+ "description": "偏移量(分钟)相对于的日程时间节点类型。",
+ "required": true,
+ "options": [
+ {
+ "value": "before_event_start",
+ "description": "日程开始前"
+ },
+ {
+ "value": "after_event_start",
+ "description": "日程开始后"
+ },
+ {
+ "value": "after_event_end",
+ "description": "日程结束后"
+ }
+ ],
+ "enum": [
+ "before_event_start",
+ "after_event_start",
+ "after_event_end"
+ ],
+ "enumName": "time_type"
+ },
+ "duration": {
+ "type": "integer",
+ "description": "相对于日程开始或者结束的偏移量(分钟)。;- 目前取值只能为列表[0, 5, 15, 30, 60]之一,0表示立即开始。;- 当time_type为before_event_start,duration不能取0。",
+ "required": true,
+ "example": "0",
+ "max": "60",
+ "min": "0"
+ }
+ }
+ },
+ "check_in_end_time": {
+ "type": "object",
+ "description": "日程签到结束时间。;;**注意**:签到开始时间不能大于或者等于签到结束时间。",
+ "required": false,
+ "ref": "check_in_time",
+ "properties": {
+ "time_type": {
+ "type": "string",
+ "description": "偏移量(分钟)相对于的日程时间节点类型。",
+ "required": true,
+ "options": [
+ {
+ "value": "before_event_start",
+ "description": "日程开始前"
+ },
+ {
+ "value": "after_event_start",
+ "description": "日程开始后"
+ },
+ {
+ "value": "after_event_end",
+ "description": "日程结束后"
+ }
+ ],
+ "enum": [
+ "before_event_start",
+ "after_event_start",
+ "after_event_end"
+ ],
+ "enumName": "time_type"
+ },
+ "duration": {
+ "type": "integer",
+ "description": "相对于日程开始或者结束的偏移量(分钟)。;- 目前取值只能为列表[0, 5, 15, 30, 60]之一,0表示立即开始。;- 当time_type为before_event_start,duration不能取0。",
+ "required": true,
+ "example": "0",
+ "max": "60",
+ "min": "0"
+ }
+ }
+ },
+ "need_notify_attendees": {
+ "type": "boolean",
+ "description": "签到开始时是否自动发送签到通知给参与者",
+ "required": false
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "日程source",
+ "required": false,
+ "example": "default"
+ }
+ },
+ "responseBody": {
+ "event": {
+ "type": "object",
+ "description": "更新后的日程实体信息。",
+ "required": false,
+ "ref": "calendar.event",
+ "properties": {
+ "event_id": {
+ "type": "string",
+ "description": "日程 ID。后续可通过该 ID 查询、更新或删除日程信息。更多信息参见[日程 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction)。",
+ "required": true,
+ "example": "00592a0e-7edf-4678-bc9d-1b77383ef08e_0",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "organizer_calendar_id": {
+ "type": "string",
+ "description": "该日程组织者的日历 ID。关于日历 ID 的说明可参见[日历 ID 说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/introduction)。",
+ "required": false,
+ "example": "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "summary": {
+ "type": "string",
+ "description": "日程标题。",
+ "required": false,
+ "example": "团队周会"
+ },
+ "description": {
+ "type": "string",
+ "description": "日程描述。",
+ "required": false,
+ "example": "讨论项目进展"
+ },
+ "start_time": {
+ "type": "object",
+ "description": "日程开始时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "开始时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的开始时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "end_time": {
+ "type": "object",
+ "description": "日程结束时间。",
+ "required": true,
+ "ref": "time_info",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "结束时间,仅全天日程使用该字段,[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) 格式,例如,2018-09-01。",
+ "required": false,
+ "example": "2018-09-01"
+ },
+ "timestamp": {
+ "type": "string",
+ "description": "秒级时间戳,指日程具体的结束时间。例如,1602504000 表示 2020/10/12 20:00:00(UTC +8 时区)。",
+ "required": false,
+ "example": "1602504000"
+ },
+ "timezone": {
+ "type": "string",
+ "description": "时区。使用 IANA Time Zone Database 标准。",
+ "required": false,
+ "example": "Asia/Shanghai"
+ }
+ }
+ },
+ "vchat": {
+ "type": "object",
+ "description": "视频会议信息。",
+ "required": false,
+ "ref": "vchat",
+ "properties": {
+ "vc_type": {
+ "type": "string",
+ "description": "视频会议类型,可以为空,表示在首次添加日程参与人时,会自动生成飞书视频会议 URL。",
+ "required": false,
+ "example": "third_party",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议"
+ },
+ {
+ "value": "third_party",
+ "description": "第三方链接视频会议"
+ },
+ {
+ "value": "no_meeting",
+ "description": "无视频会议"
+ },
+ {
+ "value": "lark_live",
+ "description": "Lark直播"
+ },
+ {
+ "value": "unknown",
+ "description": "未知类型"
+ },
+ {
+ "value": "third_party_meeting",
+ "description": "三方会议类型"
+ }
+ ],
+ "enum": [
+ "vc",
+ "third_party",
+ "no_meeting",
+ "lark_live",
+ "unknown",
+ "third_party_meeting"
+ ],
+ "enumName": "vc_type"
+ },
+ "icon_type": {
+ "type": "string",
+ "description": "第三方视频会议 icon 类型,可以为空,表示展示默认 icon。",
+ "required": false,
+ "example": "vc",
+ "options": [
+ {
+ "value": "vc",
+ "description": "飞书视频会议icon"
+ },
+ {
+ "value": "live",
+ "description": "直播视频会议icon"
+ },
+ {
+ "value": "default",
+ "description": "默认icon"
+ }
+ ],
+ "enum": [
+ "vc",
+ "live",
+ "default"
+ ],
+ "enumName": "icon_type"
+ },
+ "description": {
+ "type": "string",
+ "description": "第三方视频会议文案。",
+ "required": false,
+ "example": "发起视频会议"
+ },
+ "meeting_url": {
+ "type": "string",
+ "description": "视频会议 URL。",
+ "required": false,
+ "example": "https://example.com"
+ },
+ "live_link": {
+ "type": "string",
+ "description": "VC视频会议转直播URL,当vc_type=vc时有值。",
+ "required": false,
+ "example": "https://meetings.feishu.cn/s/1iof4hpw6i51w"
+ },
+ "vc_info": {
+ "type": "object",
+ "description": "VC视频会议原生信息。",
+ "required": false,
+ "ref": "vc_info"
+ },
+ "meeting_settings": {
+ "type": "object",
+ "description": "飞书视频会议(VC)的会前设置。",
+ "required": false,
+ "ref": "meeting_settings"
+ },
+ "third_party_meeting_settings": {
+ "type": "object",
+ "description": "三方会议设置",
+ "required": false,
+ "ref": "third_party_meeting_settings"
+ }
+ }
+ },
+ "visibility": {
+ "type": "string",
+ "description": "日程公开范围,仅对当前身份生效。",
+ "required": false,
+ "example": "default",
+ "options": [
+ {
+ "value": "default",
+ "description": "默认权限,仅向他人显示是否“忙碌”"
+ },
+ {
+ "value": "public",
+ "description": "公开,显示日程详情"
+ },
+ {
+ "value": "private",
+ "description": "私密,仅自己可见详情"
+ }
+ ],
+ "enum": [
+ "default",
+ "public",
+ "private"
+ ],
+ "enumName": "event_visibility"
+ },
+ "attendee_ability": {
+ "type": "string",
+ "description": "参与人权限。",
+ "required": false,
+ "example": "can_see_others",
+ "options": [
+ {
+ "value": "none",
+ "description": "无法编辑日程、无法邀请其它参与人、无法查看参与人列表"
+ },
+ {
+ "value": "can_see_others",
+ "description": "无法编辑日程、无法邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_invite_others",
+ "description": "无法编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ },
+ {
+ "value": "can_modify_event",
+ "description": "可以编辑日程、可以邀请其它参与人、可以查看参与人列表"
+ }
+ ],
+ "enum": [
+ "none",
+ "can_see_others",
+ "can_invite_others",
+ "can_modify_event"
+ ],
+ "enumName": "event_attendee_ability"
+ },
+ "free_busy_status": {
+ "type": "string",
+ "description": "日程占用的忙闲状态,仅对当前身份生效。",
+ "required": false,
+ "example": "busy",
+ "options": [
+ {
+ "value": "busy",
+ "description": "忙碌"
+ },
+ {
+ "value": "free",
+ "description": "空闲"
+ }
+ ],
+ "enum": [
+ "busy",
+ "free"
+ ],
+ "enumName": "event_free_busy_status"
+ },
+ "location": {
+ "type": "object",
+ "description": "日程地点。",
+ "required": false,
+ "ref": "event_location",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "地点名称。",
+ "required": false,
+ "example": "301会议室"
+ },
+ "address": {
+ "type": "string",
+ "description": "地点地址。",
+ "required": false,
+ "example": "公司大楼三层"
+ },
+ "latitude": {
+ "type": "number",
+ "description": "地点坐标纬度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "1.100000023841858"
+ },
+ "longitude": {
+ "type": "number",
+ "description": "地点坐标经度信息。;- 对于国内的地点,采用 GCJ-02 标准;- 对于海外的地点,采用 WGS84 标准",
+ "required": false,
+ "example": "2.200000047683716"
+ }
+ }
+ },
+ "color": {
+ "type": "integer",
+ "description": "日程颜色,由颜色 RGB 值的 int32 表示。;;**说明**:;- 仅对当前身份生效。;- 取值为 0 或 -1 时,表示默认跟随日历颜色。;- 客户端展示时会映射到色板上最接近的一种颜色。",
+ "required": false,
+ "example": "-1"
+ },
+ "reminders": {
+ "type": "array",
+ "description": "日程提醒列表。",
+ "required": false,
+ "properties": {
+ "minutes": {
+ "type": "integer",
+ "description": "日程提醒时间的偏移量。该参数仅对当前身份生效。;;- 正数时表示在日程开始前 X 分钟提醒。;- 负数时表示在日程开始后 X 分钟提醒。",
+ "required": false,
+ "example": "5",
+ "max": "20160",
+ "min": "-20160"
+ }
+ }
+ },
+ "recurrence": {
+ "type": "string",
+ "description": "重复日程的重复性规则,规则格式可参见 [rfc5545](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10)。",
+ "required": false,
+ "example": "FREQ=DAILY;INTERVAL=1"
+ },
+ "status": {
+ "type": "string",
+ "description": "日程状态。",
+ "required": false,
+ "example": "confirmed",
+ "options": [
+ {
+ "value": "tentative",
+ "description": "未回应"
+ },
+ {
+ "value": "confirmed",
+ "description": "已确认"
+ },
+ {
+ "value": "cancelled",
+ "description": "日程已取消"
+ }
+ ],
+ "enum": [
+ "tentative",
+ "confirmed",
+ "cancelled"
+ ],
+ "enumName": "event_status",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_exception": {
+ "type": "boolean",
+ "description": "日程是否是一个重复日程的例外日程。了解例外日程,可参见[例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)。",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "recurring_event_id": {
+ "type": "string",
+ "description": "例外日程对应的原重复日程的 event_id。",
+ "required": false,
+ "example": "1cd45aaa-fa70-4195-80b7-c93b2e208f45",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "create_time": {
+ "type": "string",
+ "description": "日程的创建时间(秒级时间戳)。",
+ "required": false,
+ "example": "1602504000",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "schemas": {
+ "type": "array",
+ "description": "日程自定义信息,控制日程详情页的 UI 展示。",
+ "required": false,
+ "properties": {
+ "ui_name": {
+ "type": "string",
+ "description": "UI 名称。可能值: ;- ForwardIcon:日程转发按钮 ;- MeetingChatIcon:会议群聊按钮 ;- MeetingMinutesIcon:会议纪要按钮 ;- MeetingVideo:视频会议区域 ;- RSVP:接受、拒绝、待定区域 ;- Attendee: 参与者区域 ;- OrganizerOrCreator:组织者或创建者区域",
+ "required": false,
+ "example": "ForwardIcon"
+ },
+ "ui_status": {
+ "type": "string",
+ "description": "UI项自定义状态。",
+ "required": false,
+ "example": "hide",
+ "options": [
+ {
+ "value": "hide",
+ "description": "隐藏显示"
+ },
+ {
+ "value": "readonly",
+ "description": "只读"
+ },
+ {
+ "value": "editable",
+ "description": "可编辑"
+ },
+ {
+ "value": "unknown",
+ "description": "未知UI项自定义状态,仅用于读取时兼容"
+ }
+ ],
+ "enum": [
+ "hide",
+ "readonly",
+ "editable",
+ "unknown"
+ ],
+ "enumName": "schema_ui_status"
+ },
+ "app_link": {
+ "type": "string",
+ "description": "按钮点击后跳转的链接。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx"
+ }
+ }
+ },
+ "event_organizer": {
+ "type": "object",
+ "description": "日程组织者信息。",
+ "required": false,
+ "ref": "event_organizer",
+ "annotations": [
+ "readOnly"
+ ],
+ "properties": {
+ "user_id": {
+ "type": "string",
+ "description": "日程组织者 user ID。",
+ "required": false,
+ "example": "ou_xxxxxx",
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "display_name": {
+ "type": "string",
+ "description": "日程组织者姓名。",
+ "required": false,
+ "example": "李健"
+ }
+ }
+ },
+ "app_link": {
+ "type": "string",
+ "description": "日程的 app_link,用于跳转到具体的某个日程。",
+ "required": false,
+ "example": "https://applink.feishu.cn/client/calendar/event/detail?calendarId=xxxxxx&key=xxxxxx&originalTime=xxxxxx&startTime=xxxxxx",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "attachments": {
+ "type": "array",
+ "description": "日程附件。",
+ "required": false,
+ "properties": {
+ "file_token": {
+ "type": "string",
+ "description": "附件 Token。调用[上传素材](https://open.larkoffice.com/document/server-docs/docs/drive-v1/media/upload_all)接口,获取附件的 file_token。在调用上传素材接口时需要注意:;;- `parent_type` 需传入固定值 `calendar`。;- `parent_node` 需传入与当前接口一致的日历 ID。;;**附件校验规则**:附件总大小不超过 25 MB。",
+ "required": false,
+ "example": "boxcnrHpsg1QDqXAAAyachaxxxx"
+ },
+ "file_size": {
+ "type": "string",
+ "description": "附件大小",
+ "required": false,
+ "example": "2345",
+ "annotations": [
+ "readOnly"
+ ]
+ },
+ "is_deleted": {
+ "type": "boolean",
+ "description": "是否删除附件",
+ "required": false,
+ "example": "false",
+ "annotations": [
+ "writeOnly"
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "附件名称",
+ "required": false,
+ "example": "附件.jpeg",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ },
+ "event_check_in": {
+ "type": "object",
+ "description": "日程签到设置,为空则不进行日程签到设置。",
+ "required": false,
+ "ref": "event_check_in",
+ "properties": {
+ "enable_check_in": {
+ "type": "boolean",
+ "description": "是否启用日程签到。",
+ "required": true,
+ "example": "true"
+ },
+ "check_in_start_time": {
+ "type": "object",
+ "description": "日程签到开始时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "check_in_end_time": {
+ "type": "object",
+ "description": "日程签到结束时间。",
+ "required": false,
+ "ref": "check_in_time"
+ },
+ "need_notify_attendees": {
+ "type": "boolean",
+ "description": "签到开始时是否自动发送签到通知给参与者",
+ "required": false
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "日程source",
+ "required": false,
+ "example": "source"
+ },
+ "self_rsvp_status": {
+ "type": "string",
+ "description": "当前日历的RSVP状态",
+ "required": false,
+ "options": [
+ {
+ "value": "needs_action",
+ "description": "参与人尚未回复状态,或表示会议室预约中"
+ },
+ {
+ "value": "accept",
+ "description": "参与人回复接受,或表示会议室预约成功"
+ },
+ {
+ "value": "tentative",
+ "description": "参与人回复待定"
+ },
+ {
+ "value": "decline",
+ "description": "参与人回复拒绝,或表示会议室预约失败"
+ },
+ {
+ "value": "removed",
+ "description": "参与人或会议室已经从日程中被移除"
+ }
+ ],
+ "enum": [
+ "needs_action",
+ "accept",
+ "tentative",
+ "decline",
+ "removed"
+ ],
+ "enumName": "rsvp_status",
+ "annotations": [
+ "readOnly"
+ ]
+ }
+ }
+ }
+ },
+ "scopes": [
+ "calendar:calendar",
+ "calendar:calendar.event:update"
+ ],
+ "accessTokens": [
+ "tenant",
+ "user"
+ ],
+ "danger": true,
+ "risk": "write",
+ "docUrl": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/patch"
+ },
+ "search_event": {
+ "id": "calendar.event.search_event",
+ "path": "calendars/{calendar_id}/events/search_event",
+ "httpMethod": "POST",
+ "description": "搜索日程",
+ "parameters": {
+ "calendar_id": {
+ "type": "string",
+ "location": "path",
+ "required": true,
+ "description": "日历ID",
+ "example": "feishu.cn_HF9U2MbibE8PPpjro6xjqa@group.calendar.feishu.cn"
+ },
+ "page_token": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该page_token 获取查询结果",
+ "default": ""
+ },
+ "page_size": {
+ "type": "integer",
+ "location": "query",
+ "required": false,
+ "description": "分页大小",
+ "default": "20",
+ "max": "30"
+ },
+ "user_id_type": {
+ "type": "string",
+ "location": "query",
+ "required": false,
+ "description": "此次调用中使用的用户ID的类型",
+ "default": "",
+ "options": [
+ {
+ "value": "user_id",
+ "description": "以user_id来识别用户"
+ },
+ {
+ "value": "union_id",
+ "description": "以union_id来识别用户"
+ },
+ {
+ "value": "open_id",
+ "description": "以open_id来识别用户"
+ }
+ ]
+ }
+ },
+ "parameterOrder": [
+ "calendar_id"
+ ],
+ "requestBody": {
+ "query": {
+ "type": "string",
+ "description": "搜索关键字,用于模糊查询日程名称。;;**注意**:如果日程名称包含下划线(_),则必须精准查询。该场景模糊查询可能无法搜索到日程。",
+ "required": true,
+ "example": "query words"
+ },
+ "filter": {
+ "type": "object",
+ "description": "搜索过滤器",
+ "required": false,
+ "ref": "calendar_event_search_filter",
+ "properties": {
+ "calendar_ids": {
+ "type": "array",
+ "description": "日历 ID 列表",
+ "required": false
+ },
+ "attendee_user_ids": {
+ "type": "array",
+ "description": "日程参与人的用户 ID 列表。设置该字段后,被搜索到的日程中至少包含其中一个参与人。",
+ "required": false,
+ "annotations": [
+ "open:x_user_id"
+ ]
+ },
+ "attendee_chat_ids": {
+ "type": "array",
+ "description": "群 ID 列表。设置该字段后,被搜索到的日程中至少包含其中一个群。",
+ "required": false
+ },
+ "meeting_room_ids": {
+ "type": "array",
+ "description": "会议室 ID 列表。设置该字段后,被搜索到的日程中至少包含其中一个会议室。",
+ "required": false
+ },
+ "time_range": {
+ "type": "object",
+ "description": "日程搜索区间的开始时间。不传值时,默认搜索当前时间前后一个周内的日程。",
+ "required": false,
+ "ref": "time_range",
+ "properties": {
+ "start_time": {
+ "type": "string",
+ "description": "范围内的起始时间 (RFC 3339)",
+ "required": false,
+ "example": "2026-03-21T16:15:30+08:00"
+ },
+ "end_time": {
+ "type": "string",
+ "description": "范围内的结束时间 (RFC 3339)",
+ "required": false,
+ "example": "2026-03-21T16:15:30+08:00"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responseBody": {
+ "has_more": {
+ "type": "boolean",
+ "description": "是否有下一页",
+ "required": false
+ },
+ "items": {
+ "type": "array",
+ "description": "搜索命中的日程列表",
+ "required": false,
+ "properties": {
+ "display_info": {
+ "type": "string",
+ "description": "包含日程基本信息的卡片,用户搜索关键词命中的文本片段,使用
Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + } + } + } + }, + "responseBody": { + "template": { + "type": "object", + "description": "创建成功的模板实体", + "required": false, + "ref": "template", + "properties": { + "template_id": { + "type": "string", + "description": "模板 id", + "required": false, + "example": "7281187859195772947", + "annotations": [ + "readOnly" + ] + }, + "name": { + "type": "string", + "description": "模板名称,不超过 100 字符", + "required": false, + "example": "销售跟进模板" + }, + "subject": { + "type": "string", + "description": "邮件主题", + "required": false, + "example": "关于本周订单跟进" + }, + "template_content": { + "type": "string", + "description": "模板正文(HTML 或纯文本)", + "required": false, + "example": "Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + }, + "create_time": { + "type": "string", + "description": "模板创建时间(毫秒级时间戳字符串,避免 JS 弱类型侧 i64 精度丢失)", + "required": false, + "example": "1716279320000", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.template&version=v1" + }, + "delete": { + "id": "user_mailbox.template.delete", + "path": "user_mailboxes/{user_mailbox_id}/templates/{template_id}", + "httpMethod": "DELETE", + "description": "删除指定邮件模板", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。使用 user_access_token 时可使用 me", + "example": "user@xxx.xx 或 me" + }, + "template_id": { + "type": "string", + "location": "path", + "required": true, + "description": "模板 id", + "example": "7281187859195772947" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "template_id" + ], + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.template&version=v1" + }, + "get": { + "id": "user_mailbox.template.get", + "path": "user_mailboxes/{user_mailbox_id}/templates/{template_id}", + "httpMethod": "GET", + "description": "获取指定邮件模板详情", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。使用 user_access_token 时可使用 me", + "example": "user@xxx.xx 或 me" + }, + "template_id": { + "type": "string", + "location": "path", + "required": true, + "description": "模板 id", + "example": "7281187859195772947" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "template_id" + ], + "responseBody": { + "template": { + "type": "object", + "description": "模板详情", + "required": false, + "ref": "template", + "properties": { + "template_id": { + "type": "string", + "description": "模板 id", + "required": false, + "example": "7281187859195772947", + "annotations": [ + "readOnly" + ] + }, + "name": { + "type": "string", + "description": "模板名称,不超过 100 字符", + "required": false, + "example": "销售跟进模板" + }, + "subject": { + "type": "string", + "description": "邮件主题", + "required": false, + "example": "关于本周订单跟进" + }, + "template_content": { + "type": "string", + "description": "模板正文(HTML 或纯文本)", + "required": false, + "example": "Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + }, + "create_time": { + "type": "string", + "description": "模板创建时间(毫秒级时间戳字符串,避免 JS 弱类型侧 i64 精度丢失)", + "required": false, + "example": "1716279320000", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "mail:user_mailbox.message:readonly", + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.template&version=v1" + }, + "list": { + "id": "user_mailbox.template.list", + "path": "user_mailboxes/{user_mailbox_id}/templates", + "httpMethod": "GET", + "description": "列出指定邮箱下的全部个人邮件模板(不分页,仅返回 id 与 name)", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。使用 user_access_token 时可使用 me", + "example": "user@xxx.xx 或 me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "responseBody": { + "items": { + "type": "array", + "description": "模板列表(仅返回 template_id 与 name)", + "required": false, + "properties": { + "template_id": { + "type": "string", + "description": "模板 id", + "required": false, + "example": "7281187859195772947", + "annotations": [ + "readOnly" + ] + }, + "name": { + "type": "string", + "description": "模板名称,不超过 100 字符", + "required": false, + "example": "销售跟进模板" + }, + "subject": { + "type": "string", + "description": "邮件主题", + "required": false, + "example": "关于本周订单跟进" + }, + "template_content": { + "type": "string", + "description": "模板正文(HTML 或纯文本)", + "required": false, + "example": "Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + }, + "create_time": { + "type": "string", + "description": "模板创建时间(毫秒级时间戳字符串,避免 JS 弱类型侧 i64 精度丢失)", + "required": false, + "example": "1716279320000", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "mail:user_mailbox.message:readonly", + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.template&version=v1" + }, + "update": { + "id": "user_mailbox.template.update", + "path": "user_mailboxes/{user_mailbox_id}/templates/{template_id}", + "httpMethod": "PUT", + "description": "全量替换指定邮件模板内容", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。使用 user_access_token 时可使用 me", + "example": "user@xxx.xx 或 me" + }, + "template_id": { + "type": "string", + "location": "path", + "required": true, + "description": "模板 id", + "example": "7281187859195772947" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "template_id" + ], + "requestBody": { + "template": { + "type": "object", + "description": "替换后的完整模板内容(全量替换)", + "required": true, + "ref": "template", + "properties": { + "name": { + "type": "string", + "description": "模板名称,不超过 100 字符", + "required": false, + "example": "销售跟进模板" + }, + "subject": { + "type": "string", + "description": "邮件主题", + "required": false, + "example": "关于本周订单跟进" + }, + "template_content": { + "type": "string", + "description": "模板正文(HTML 或纯文本)", + "required": false, + "example": "Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + } + } + } + }, + "responseBody": { + "template": { + "type": "object", + "description": "更新后的模板", + "required": false, + "ref": "template", + "properties": { + "template_id": { + "type": "string", + "description": "模板 id", + "required": false, + "example": "7281187859195772947", + "annotations": [ + "readOnly" + ] + }, + "name": { + "type": "string", + "description": "模板名称,不超过 100 字符", + "required": false, + "example": "销售跟进模板" + }, + "subject": { + "type": "string", + "description": "邮件主题", + "required": false, + "example": "关于本周订单跟进" + }, + "template_content": { + "type": "string", + "description": "模板正文(HTML 或纯文本)", + "required": false, + "example": "Hi ${name},
" + }, + "is_plain_text_mode": { + "type": "boolean", + "description": "是否为纯文本模式", + "required": false, + "example": "false" + }, + "tos": { + "type": "array", + "description": "默认收件人地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "ccs": { + "type": "array", + "description": "默认抄送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "bccs": { + "type": "array", + "description": "默认密送地址列表", + "required": false, + "properties": { + "mail_address": { + "type": "string", + "description": "邮件地址", + "required": true, + "example": "user@xxx.xx" + }, + "name": { + "type": "string", + "description": "名称", + "required": false, + "example": "Mike" + } + } + }, + "attachments": { + "type": "array", + "description": "模板附件与内嵌图片列表", + "required": false, + "properties": { + "filename": { + "type": "string", + "description": "附件文件名", + "required": false, + "example": "plan.xlsx" + }, + "id": { + "type": "string", + "description": "附件 id(Drive file_key,用于引用 Drive medias 上传接口返回的 file_key)", + "required": false, + "example": "boxcnrHpsg1QDqXPrJXWPwbqsKh" + }, + "attachment_type": { + "type": "integer", + "description": "附件类型", + "required": false, + "example": "1", + "options": [ + { + "value": "1", + "description": "普通附件" + }, + { + "value": "2", + "description": "超大附件" + } + ], + "enum": [ + "1", + "2" + ], + "enumName": "AttachmentType", + "max": "2", + "min": "1" + }, + "is_inline": { + "type": "boolean", + "description": "是否为内联图片,true 表示是内联图片", + "required": false, + "example": "false" + }, + "cid": { + "type": "string", + "description": "内容 ID,HTML 中通过 cid: 协议引用该图片", + "required": false, + "example": "image1@example.com" + } + } + }, + "create_time": { + "type": "string", + "description": "模板创建时间(毫秒级时间戳字符串,避免 JS 弱类型侧 i64 精度丢失)", + "required": false, + "example": "1716279320000", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.template&version=v1" + } + } + }, + "user_mailbox.threads": { + "methods": { + "batch_modify": { + "id": "user_mailbox.thread.batch_modify", + "path": "user_mailboxes/{user_mailbox_id}/threads/batch_modify", + "httpMethod": "POST", + "description": "批量修改邮件会话", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "add_label_ids": { + "type": "array", + "description": "待添加的标签。可选值包括:UNREAD、IMPORTANT、OTHER、FLAGGED,以及自定义标签 ID。", + "required": false + }, + "remove_label_ids": { + "type": "array", + "description": "待移除的标签。可选值包括:UNREAD、IMPORTANT、OTHER、FLAGGED,以及自定义标签 ID。", + "required": false + }, + "add_folder": { + "type": "string", + "description": "需要移入的文件夹。支持INBOX、SENT、SPAM、ARCHIVED以及自定义文件夹ID", + "required": false, + "example": "INBOX" + }, + "thread_ids": { + "type": "array", + "description": "需要操作的邮件会话ID,可通过列出邮件会话获取", + "required": false + } + }, + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_modify&project=mail&resource=user_mailbox.thread&version=v1" + }, + "batch_trash": { + "id": "user_mailbox.thread.batch_trash", + "path": "user_mailboxes/{user_mailbox_id}/threads/batch_trash", + "httpMethod": "POST", + "description": "批量删除邮件会话", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "thread_ids": { + "type": "array", + "description": "邮箱会话ID,可通过列出邮件会话接口获取", + "required": false + } + }, + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_trash&project=mail&resource=user_mailbox.thread&version=v1" + }, + "get": { + "id": "user_mailbox.thread.get", + "path": "user_mailboxes/{user_mailbox_id}/threads/{thread_id}", + "httpMethod": "GET", + "description": "获取邮件会话详情", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户", + "example": "user@xxx.xx 或 me" + }, + "thread_id": { + "type": "string", + "location": "path", + "required": true, + "description": "邮件会话ID。可通过发送邮件、回复邮件的接口返回值或获取邮件详情接口查询获得。", + "example": "th_xxxxxxxxxxxx" + }, + "format": { + "type": "string", + "location": "query", + "required": false, + "description": "需要获取的邮件内容。支持选择full/plain_text_full/metadata", + "default": "", + "example": "full", + "options": [ + { + "value": "full", + "description": "全文,包括标签、文件夹、主题、收发件人、纯文本、HTML等信息" + }, + { + "value": "plain_text_full", + "description": "全文,只返回纯文本正文内容,不返回HTML。返回内容包括标签、文件夹、主题、收发件人、纯文本等信息" + }, + { + "value": "metadata", + "description": "邮件元数据信息,包括标签、文件夹、主题、收发件人、摘要等信息,不返回正文内容" + } + ], + "enumName": "mail_message_format_type" + }, + "include_spam_trash": { + "type": "boolean", + "location": "query", + "required": false, + "description": "获取包含来自 SPAM 和 TRASH 的邮件", + "default": "", + "example": "true" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "thread_id" + ], + "responseBody": { + "thread": { + "type": "object", + "description": "", + "required": false, + "ref": "thread", + "properties": { + "id": { + "type": "string", + "description": "会话ID", + "required": false, + "example": "xx" + }, + "body_preview": { + "type": "string", + "description": "会话内的最新的一封邮件摘要,用于快速预览邮件核心内容", + "required": false, + "example": "hello world" + }, + "messages": { + "type": "array", + "description": "会话中的邮件列表", + "required": false, + "properties": { + "subject": { + "type": "string", + "description": "主题", + "required": false, + "example": "邮件标题", + "annotations": [ + "lark:data:message.subject" + ] + }, + "to": { + "type": "array", + "description": "收件人", + "required": false, + "annotations": [ + "lark:data:message.address" + ] + }, + "cc": { + "type": "array", + "description": "抄送", + "required": false, + "annotations": [ + "lark:data:message.address" + ] + }, + "bcc": { + "type": "array", + "description": "密送", + "required": false, + "annotations": [ + "lark:data:message.address" + ] + }, + "head_from": { + "type": "object", + "description": "发件人", + "required": false, + "ref": "mail_address", + "annotations": [ + "lark:data:message.address" + ] + }, + "body_html": { + "type": "string", + "description": "正文(base64url)", + "required": false, + "example": "xxxx", + "annotations": [ + "lark:data:message.body" + ] + }, + "internal_date": { + "type": "string", + "description": "创建/收/发信时间(毫秒)", + "required": false, + "example": "1682377086000" + }, + "message_state": { + "type": "integer", + "description": "邮件状态,1为收信,2为发信,3为草稿", + "required": false, + "example": "1" + }, + "smtp_message_id": { + "type": "string", + "description": "RFC协议id", + "required": false, + "example": "ay0azrJDvbs3FJAg@outlook.com" + }, + "message_id": { + "type": "string", + "description": "邮件id", + "required": false, + "example": "tfuh9N4WnzU6jdDw=" + }, + "attachments": { + "type": "array", + "description": "邮件附件列表", + "required": false, + "annotations": [ + "lark:data:message.body" + ] + }, + "body_plain_text": { + "type": "string", + "description": "正文纯文本(base64url)", + "required": false, + "example": "xxxxx", + "annotations": [ + "lark:data:message.body" + ] + }, + "thread_id": { + "type": "string", + "description": "会话id", + "required": false, + "example": "tfuh9N4WnzU6jdDw=" + }, + "body_preview": { + "type": "string", + "description": "邮件正文纯文本内容的前100个字符,基于base64url编码,用于快速预览邮件核心内容,无需解码完整正文", + "required": false, + "example": "xxxxx" + }, + "label_ids": { + "type": "array", + "description": "标签ID", + "required": false + }, + "folder_id": { + "type": "string", + "description": "文件夹ID", + "required": false, + "example": "INBOX" + }, + "in_reply_to": { + "type": "string", + "description": "In-Reply-To邮件头", + "required": false, + "example": "06d20.dbf451a3.808a.475a.acc9.1363dfd20f36@larksuite.com" + }, + "reply_to": { + "type": "string", + "description": "Reply-To邮件头", + "required": false, + "example": "06d20.dbf451a3.808a.475a.acc9.1363dfd20f36@larksuite.com" + }, + "priority_type": { + "type": "string", + "description": "邮件优先级", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "无优先级" + }, + { + "value": "1", + "description": "高优先级" + }, + { + "value": "3", + "description": "正常优先级" + }, + { + "value": "5", + "description": "低优先级" + } + ], + "enum": [ + "0", + "1", + "3", + "5" + ], + "enumName": "priority_type" + }, + "security_level": { + "type": "object", + "description": "安全信息", + "required": false, + "ref": "security_level" + }, + "references": { + "type": "string", + "description": "References邮件头", + "required": false, + "example": "<5678.abcd@test.com>\\r\\n\\t<1234.abcd@message-id>" + }, + "body_calendar": { + "type": "string", + "description": "日历邀请内容(base64url)。当邮件包含标准RFC 5545格式的日历邀请时返回,解码后为ICS文本。", + "required": false, + "example": "QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KLi4uDQpFTkQ6VkNBTEVOREFS", + "annotations": [ + "lark:data:message.body" + ] + } + } + } + } + } + }, + "scopes": [ + "mail:user_mailbox.message:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.thread&version=v1" + }, + "list": { + "id": "user_mailbox.thread.list", + "path": "user_mailboxes/{user_mailbox_id}/threads", + "httpMethod": "GET", + "description": "列出邮件会话", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户", + "example": "user@xxx.xx 或 me" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": true, + "description": "分页大小", + "default": "", + "example": "1", + "max": "20", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果", + "default": "", + "example": "xxx" + }, + "folder_id": { + "type": "string", + "location": "query", + "required": false, + "description": "文件夹 id,支持INBOX、SENT、SPAM、ARCHIVED、SCHEDULED、TRASH、DRAFT以及自定义文件夹ID", + "default": "", + "example": "INBOX 或者用户文件夹 id" + }, + "only_unread": { + "type": "boolean", + "location": "query", + "required": false, + "description": "是否只查询未读会话", + "default": "", + "example": "true" + }, + "label_id": { + "type": "string", + "location": "query", + "required": false, + "description": "标签id,支持IMPORTANT、OTHER、FLAGGED以及自定义标签ID", + "default": "", + "example": "FLAGGED" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "responseBody": { + "items": { + "type": "array", + "description": "会话列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "会话ID", + "required": false, + "example": "xx" + }, + "body_preview": { + "type": "string", + "description": "会话内的最新的一封邮件摘要,用于快速预览邮件核心内容", + "required": false, + "example": "hello world" + } + } + }, + "page_token": { + "type": "string", + "description": "分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token", + "required": false, + "example": "xxx" + }, + "has_more": { + "type": "boolean", + "description": "是否还有更多项", + "required": false, + "example": "true" + } + }, + "scopes": [ + "mail:user_mailbox.message:readonly" + ], + "accessTokens": [ + "tenant", + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.thread&version=v1" + }, + "modify": { + "id": "user_mailbox.thread.modify", + "path": "user_mailboxes/{user_mailbox_id}/threads/{thread_id}/modify", + "httpMethod": "POST", + "description": "修改邮件会话", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户", + "example": "me" + }, + "thread_id": { + "type": "string", + "location": "path", + "required": true, + "description": "邮件会话ID。可通过发送邮件、回复邮件的接口返回值或获取邮件详情接口查询获得。", + "example": "th_xxxxxxxxxxxx" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "thread_id" + ], + "requestBody": { + "add_label_ids": { + "type": "array", + "description": "待添加的标签。可选值包括:UNREAD、IMPORTANT、OTHER、FLAGGED,以及自定义标签 ID。", + "required": false + }, + "remove_label_ids": { + "type": "array", + "description": "待移除的标签。可选值包括:UNREAD、IMPORTANT、OTHER、FLAGGED,以及自定义标签 ID。", + "required": false + }, + "add_folder": { + "type": "string", + "description": "需要移入的文件夹。支持INBOX、SENT、SPAM、ARCHIVED以及自定义文件夹ID", + "required": false, + "example": "INBOX" + } + }, + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=modify&project=mail&resource=user_mailbox.thread&version=v1" + }, + "trash": { + "id": "user_mailbox.thread.trash", + "path": "user_mailboxes/{user_mailbox_id}/threads/{thread_id}/trash", + "httpMethod": "POST", + "description": "删除邮件会话", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱地址。当使用用户身份访问时,可以输入\"me\"代表当前调用接口用户。", + "example": "me" + }, + "thread_id": { + "type": "string", + "location": "path", + "required": true, + "description": "邮件会话ID。可通过发送邮件、回复邮件的接口返回值或获取邮件详情接口查询获得。", + "example": "th_xxxxxxxxxxxx" + } + }, + "parameterOrder": [ + "user_mailbox_id", + "thread_id" + ], + "scopes": [ + "mail:user_mailbox.message:modify" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=trash&project=mail&resource=user_mailbox.thread&version=v1" + } + } + }, + "user_mailbox.allow_senders": { + "methods": { + "list": { + "id": "user_mailbox.allow_sender.list", + "path": "user_mailboxes/{user_mailbox_id}/allow_senders", + "httpMethod": "GET", + "description": "分页列出或按 keyword 查询当前用户白名单发件人。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + }, + "keyword": { + "type": "string", + "location": "query", + "required": false, + "description": "搜索关键词。为空时分页列出名单,非空时按关键词查询。", + "default": "", + "example": "example.com" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页标记。当 has_more 为 true 时,使用该值获取下一页。", + "default": "", + "example": "1710000000" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "每页返回数量。取值范围 1-100。", + "default": "", + "example": "50", + "max": "100", + "min": "1" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "responseBody": { + "items": { + "type": "array", + "description": "名单记录列表。", + "required": false, + "properties": { + "sender": { + "type": "string", + "description": "邮箱地址或域名。", + "required": false, + "example": "trusted@example.com" + }, + "create_time": { + "type": "string", + "description": "创建时间,毫秒级时间戳字符串。", + "required": false, + "example": "1716279320000" + } + } + }, + "has_more": { + "type": "boolean", + "description": "是否还有更多数据。", + "required": false, + "example": "false" + }, + "page_token": { + "type": "string", + "description": "下一页分页标记。", + "required": false, + "example": "1716279320000" + } + }, + "scopes": [ + "mail:user_mailbox:readonly" + ], + "accessTokens": [ + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.allow_sender&version=v1" + }, + "batch_create": { + "id": "user_mailbox.allow_sender.batch_create", + "path": "user_mailboxes/{user_mailbox_id}/allow_senders/batch_create", + "httpMethod": "POST", + "description": "批量将邮箱地址或域名加入当前用户白名单。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "items": { + "type": "array", + "description": "批量加入名单的发件人项。", + "required": true, + "properties": { + "sender": { + "type": "string", + "description": "邮箱地址或域名。", + "required": true, + "example": "trusted@example.com" + }, + "sender_type": { + "type": "integer", + "description": "发件人类型/来源,默认 1 表示 sender。", + "required": false, + "example": "1", + "min": "1" + } + } + } + }, + "responseBody": { + "failed_items": { + "type": "array", + "description": "批量写入失败项。", + "required": false, + "properties": { + "sender": { + "type": "string", + "description": "写入失败的邮箱地址或域名。", + "required": false, + "example": "spam@example.com" + }, + "code": { + "type": "integer", + "description": "失败错误码。", + "required": false, + "example": "1230001" + }, + "message": { + "type": "string", + "description": "失败原因。", + "required": false, + "example": "invalid sender" + } + } + } + }, + "scopes": [ + "mail:user_mailbox" + ], + "accessTokens": [ + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=user_mailbox.allow_sender&version=v1" + }, + "batch_remove": { + "id": "user_mailbox.allow_sender.batch_remove", + "path": "user_mailboxes/{user_mailbox_id}/allow_senders/batch_remove", + "httpMethod": "POST", + "description": "批量从当前用户白名单删除邮箱地址或域名。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "senders": { + "type": "array", + "description": "批量删除的邮箱地址或域名。", + "required": true + } + }, + "responseBody": { + "deleted_count": { + "type": "integer", + "description": "成功删除数量。", + "required": false, + "example": "1" + } + }, + "scopes": [ + "mail:user_mailbox" + ], + "accessTokens": [ + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=mail&resource=user_mailbox.allow_sender&version=v1" + } + } + }, + "user_mailbox.blocked_senders": { + "methods": { + "list": { + "id": "user_mailbox.blocked_sender.list", + "path": "user_mailboxes/{user_mailbox_id}/blocked_senders", + "httpMethod": "GET", + "description": "分页列出或按 keyword 查询当前用户黑名单发件人。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + }, + "keyword": { + "type": "string", + "location": "query", + "required": false, + "description": "搜索关键词。为空时分页列出名单,非空时按关键词查询。", + "default": "", + "example": "example.com" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页标记。当 has_more 为 true 时,使用该值获取下一页。", + "default": "", + "example": "1710000000" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "每页返回数量。取值范围 1-100。", + "default": "", + "example": "50", + "max": "100", + "min": "1" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "responseBody": { + "items": { + "type": "array", + "description": "名单记录列表。", + "required": false, + "properties": { + "sender": { + "type": "string", + "description": "邮箱地址或域名。", + "required": false, + "example": "trusted@example.com" + }, + "create_time": { + "type": "string", + "description": "创建时间,毫秒级时间戳字符串。", + "required": false, + "example": "1716279320000" + } + } + }, + "has_more": { + "type": "boolean", + "description": "是否还有更多数据。", + "required": false, + "example": "false" + }, + "page_token": { + "type": "string", + "description": "下一页分页标记。", + "required": false, + "example": "1716279320000" + } + }, + "scopes": [ + "mail:user_mailbox:readonly" + ], + "accessTokens": [ + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.blocked_sender&version=v1" + }, + "batch_create": { + "id": "user_mailbox.blocked_sender.batch_create", + "path": "user_mailboxes/{user_mailbox_id}/blocked_senders/batch_create", + "httpMethod": "POST", + "description": "批量将邮箱地址或域名加入当前用户黑名单。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "items": { + "type": "array", + "description": "批量加入名单的发件人项。", + "required": true, + "properties": { + "sender": { + "type": "string", + "description": "邮箱地址或域名。", + "required": true, + "example": "trusted@example.com" + }, + "sender_type": { + "type": "integer", + "description": "发件人类型/来源,默认 1 表示 sender。", + "required": false, + "example": "1", + "min": "1" + } + } + } + }, + "responseBody": { + "failed_items": { + "type": "array", + "description": "批量写入失败项。", + "required": false, + "properties": { + "sender": { + "type": "string", + "description": "写入失败的邮箱地址或域名。", + "required": false, + "example": "spam@example.com" + }, + "code": { + "type": "integer", + "description": "失败错误码。", + "required": false, + "example": "1230001" + }, + "message": { + "type": "string", + "description": "失败原因。", + "required": false, + "example": "invalid sender" + } + } + } + }, + "scopes": [ + "mail:user_mailbox" + ], + "accessTokens": [ + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=user_mailbox.blocked_sender&version=v1" + }, + "batch_remove": { + "id": "user_mailbox.blocked_sender.batch_remove", + "path": "user_mailboxes/{user_mailbox_id}/blocked_senders/batch_remove", + "httpMethod": "POST", + "description": "批量从当前用户黑名单删除邮箱地址或域名。", + "parameters": { + "user_mailbox_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户邮箱 ID。本期仅支持 me,表示当前登录用户。", + "example": "me" + } + }, + "parameterOrder": [ + "user_mailbox_id" + ], + "requestBody": { + "senders": { + "type": "array", + "description": "批量删除的邮箱地址或域名。", + "required": true + } + }, + "responseBody": { + "deleted_count": { + "type": "integer", + "description": "成功删除数量。", + "required": false, + "example": "1" + } + }, + "scopes": [ + "mail:user_mailbox" + ], + "accessTokens": [ + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=mail&resource=user_mailbox.blocked_sender&version=v1" + } + } + } + } + }, + { + "name": "minutes", + "version": "v1", + "title": "妙记 API", + "description": "minutes info and content query", + "servicePath": "/open-apis/minutes/v1", + "resources": { + "minutes": { + "methods": { + "get": { + "id": "minute.get", + "path": "minutes/{minute_token}", + "httpMethod": "GET", + "description": "获取妙记信息", + "parameters": { + "minute_token": { + "type": "string", + "location": "path", + "required": true, + "description": "妙记唯一标识。可从妙记的 URL 链接中获取,一般为最后一串字符:https://sample.feishu.cn/minutes/==obcnq3b9jl72l83w4f14xxxx==;", + "example": "obcnq3b9jl72l83w4f14xxxx" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户ID的类型", + "default": "", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + } + }, + "parameterOrder": [ + "minute_token" + ], + "responseBody": { + "minute": { + "type": "object", + "description": "妙记基本信息", + "required": false, + "ref": "minute", + "properties": { + "token": { + "type": "string", + "description": "妙记token", + "required": false, + "example": "obcnq3b9jl72l83w4f14xxxx", + "annotations": [ + "readOnly" + ] + }, + "owner_id": { + "type": "string", + "description": "所有者ID", + "required": false, + "example": "ou_612b787ccd3259fb3c816b3f678dxxxx", + "annotations": [ + "open:x_user_id" + ] + }, + "create_time": { + "type": "string", + "description": "妙记创建时间timestamp(ms级别)", + "required": false, + "example": "1669098360477", + "annotations": [ + "readOnly" + ] + }, + "title": { + "type": "string", + "description": "妙记标题", + "required": false, + "example": "xxx的视频会议" + }, + "cover": { + "type": "string", + "description": "妙记封面链接", + "required": false, + "example": "https://internal-api-drive-stream.feishu-pre.cn/space/api/box/stream/download/all/boxcncsI4EIhCSA1RLDsXDpxxxx" + }, + "duration": { + "type": "string", + "description": "妙记时长(ms级别)", + "required": false, + "example": "314000" + }, + "url": { + "type": "string", + "description": "妙记链接", + "required": false, + "example": "https://bytedance.feishu-pre.cn/minutes/obcnq3b9jl72l83w4f14xxxx", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "minutes:minutes", + "minutes:minutes:readonly", + "minutes:minutes.basic:read" + ], + "accessTokens": [ + "tenant", + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=minutes&resource=minute&version=v1" + } + } + } + } + }, + { + "name": "okr", + "version": "v2", + "title": "OKR API", + "description": "OKR 目标、关键结果、对齐、量化指标管理", + "servicePath": "/open-apis/okr/v2", + "resources": { + "alignments": { + "methods": { + "delete": { + "id": "alignments.delete", + "path": "alignments/{alignment_id}", + "httpMethod": "DELETE", + "description": "删除对齐关系", + "parameters": { + "alignment_id": { + "type": "string", + "location": "path", + "required": true, + "description": "对齐 ID", + "example": "1" + } + }, + "parameterOrder": [ + "alignment_id" + ], + "responseBody": { + "alignment_id": { + "type": "string", + "description": "对齐 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=okr&resource=okr.alignment&version=v2" + }, + "get": { + "id": "alignments.get", + "path": "alignments/{alignment_id}", + "httpMethod": "GET", + "description": "获取对齐关系", + "parameters": { + "alignment_id": { + "type": "string", + "location": "path", + "required": true, + "description": "对齐 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "alignment_id" + ], + "responseBody": { + "alignment": { + "type": "object", + "description": "对齐", + "required": false, + "ref": "alignment", + "properties": { + "id": { + "type": "string", + "description": "对齐的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "对齐的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "对齐的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "from_owner": { + "type": "object", + "description": "发起对齐的所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "to_owner": { + "type": "object", + "description": "被对齐的所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "from_entity_type": { + "type": "integer", + "description": "发起对齐的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + } + ], + "enum": [ + "2" + ] + }, + "from_entity_id": { + "type": "string", + "description": "发起对齐的实体 ID", + "required": true, + "example": "1" + }, + "to_entity_type": { + "type": "integer", + "description": "被对齐的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + } + ], + "enum": [ + "2" + ] + }, + "to_entity_id": { + "type": "string", + "description": "被对齐的实体 ID", + "required": true, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=okr&resource=okr.alignment&version=v2" + } + } + }, + "categories": { + "methods": { + "list": { + "id": "categories.list", + "path": "categories", + "httpMethod": "GET", + "description": "批量获取分类", + "parameters": { + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "分页大小,最大 100", + "default": "10", + "max": "100", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页键,首个分页键传入空串", + "default": "" + }, + "owner_type": { + "type": "string", + "location": "query", + "required": false, + "description": "分类的所属类型", + "default": "user", + "options": [ + { + "value": "user", + "description": "员工" + }, + { + "value": "department", + "description": "部门" + } + ] + } + }, + "responseBody": { + "has_more": { + "type": "boolean", + "description": "是否有下一页", + "required": false + }, + "page_token": { + "type": "string", + "description": "分页键,下一个分页需传入该键", + "required": false + }, + "items": { + "type": "array", + "description": "分类列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "分类 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "分类的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "分类的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "category_type": { + "type": "string", + "description": "分类类型", + "required": true, + "example": "user", + "options": [ + { + "value": "person", + "description": "个人" + }, + { + "value": "team", + "description": "团队" + } + ], + "enum": [ + "person", + "team" + ] + }, + "enabled": { + "type": "boolean", + "description": "是否启用", + "required": true, + "example": "true" + }, + "color": { + "type": "string", + "description": "颜色", + "required": true, + "example": "blue", + "options": [ + { + "value": "blue", + "description": "蓝色" + }, + { + "value": "purple", + "description": "紫色" + }, + { + "value": "wathet", + "description": "浅蓝色" + }, + { + "value": "turquoise", + "description": "绿松石" + }, + { + "value": "indigo", + "description": "靛青" + }, + { + "value": "orange", + "description": "橙色" + } + ], + "enum": [ + "blue", + "purple", + "wathet", + "turquoise", + "indigo", + "orange" + ] + }, + "name": { + "type": "object", + "description": "名称", + "required": true, + "ref": "category_name", + "properties": { + "zh": { + "type": "string", + "description": "中文名", + "required": false, + "example": "中文" + }, + "en": { + "type": "string", + "description": "英文名", + "required": false, + "example": "英文" + }, + "ja": { + "type": "string", + "description": "日文名", + "required": false, + "example": "日文" + } + } + } + } + } + }, + "scopes": [ + "okr:okr.setting:read" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.category&version=v2" + } + } + }, + "cycles": { + "methods": { + "list": { + "id": "cycles.list", + "path": "cycles", + "httpMethod": "GET", + "description": "批量获取用户周期", + "parameters": { + "user_id": { + "type": "string", + "location": "query", + "required": true, + "description": "用户 ID", + "default": "", + "example": "ou_3bbe8a09c20e89cce9bff989ed840674" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "分页大小,最大 100", + "default": "10", + "max": "100", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页键,首个分页键传入空串", + "default": "" + } + }, + "responseBody": { + "has_more": { + "type": "boolean", + "description": "是否有下一页", + "required": false + }, + "page_token": { + "type": "string", + "description": "分页键,下一个分页需传入该键", + "required": false, + "example": "1" + }, + "items": { + "type": "array", + "description": "用户周期列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "用户周期 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "用户周期的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "用户周期的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "tenant_cycle_id": { + "type": "string", + "description": "租户周期 ID", + "required": true, + "example": "1" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "start_time": { + "type": "string", + "description": "周期的开始时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "end_time": { + "type": "string", + "description": "周期的结束时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "cycle_status": { + "type": "integer", + "description": "用户周期状态", + "required": false, + "example": "1", + "options": [ + { + "value": "0", + "description": "默认" + }, + { + "value": "1", + "description": "正常" + }, + { + "value": "2", + "description": "失效" + }, + { + "value": "3", + "description": "隐藏" + } + ], + "enum": [ + "0", + "1", + "2", + "3" + ] + }, + "score": { + "type": "number", + "description": "用户周期的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + } + } + } + }, + "scopes": [ + "okr:okr.period:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.cycle&version=v2" + }, + "objectives_position": { + "id": "cycles.objectives_position", + "path": "cycles/{cycle_id}/objectives_position", + "httpMethod": "PUT", + "description": "更新用户周期下全部目标的位置", + "parameters": { + "cycle_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户周期 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "cycle_id" + ], + "requestBody": { + "objective_ids": { + "type": "array", + "description": "目标 ID 列表,按照序号顺序", + "required": true + } + }, + "responseBody": { + "items": { + "type": "array", + "description": "目标列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "目标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "目标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "目标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "cycle_id": { + "type": "string", + "description": "目标的用户周期 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "目标的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=objectives_position&project=okr&resource=okr.cycle&version=v2" + }, + "objectives_weight": { + "id": "cycles.objectives_weight", + "path": "cycles/{cycle_id}/objectives_weight", + "httpMethod": "PUT", + "description": "更新用户周期下全部目标的权重", + "parameters": { + "cycle_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户周期 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "cycle_id" + ], + "requestBody": { + "objective_weights": { + "type": "array", + "description": "目标权重列表", + "required": true, + "properties": { + "objective_id": { + "type": "string", + "description": "目标 ID", + "required": true, + "example": "1" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": true, + "example": "0.5", + "max": "1", + "min": "0" + } + } + } + }, + "responseBody": { + "items": { + "type": "array", + "description": "目标列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "目标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "目标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "目标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "cycle_id": { + "type": "string", + "description": "目标的用户周期 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "目标的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=objectives_weight&project=okr&resource=okr.cycle&version=v2" + } + } + }, + "cycle.objectives": { + "methods": { + "create": { + "id": "cycle.objectives.create", + "path": "cycles/{cycle_id}/objectives", + "httpMethod": "POST", + "description": "创建目标", + "parameters": { + "cycle_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户周期 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "cycle_id" + ], + "requestBody": { + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + } + }, + "responseBody": { + "objective_id": { + "type": "string", + "description": "目标 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=okr&resource=okr.cycle.objective&version=v2" + }, + "list": { + "id": "cycle.objectives.list", + "path": "cycles/{cycle_id}/objectives", + "httpMethod": "GET", + "description": "批量获取用户周期下的目标", + "parameters": { + "cycle_id": { + "type": "string", + "location": "path", + "required": true, + "description": "用户周期 ID", + "example": "1" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "分页大小,最大 100", + "default": "10", + "max": "100", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页键,首个分页键传入空串", + "default": "" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "cycle_id" + ], + "responseBody": { + "has_more": { + "type": "boolean", + "description": "是否有下一页", + "required": false + }, + "page_token": { + "type": "string", + "description": "分页键,下一个分页需传入该键", + "required": false + }, + "items": { + "type": "array", + "description": "目标列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "目标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "目标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "目标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "cycle_id": { + "type": "string", + "description": "目标的用户周期 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "目标的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.cycle.objective&version=v2" + } + } + }, + "indicators": { + "methods": { + "patch": { + "id": "indicators.patch", + "path": "indicators/{indicator_id}", + "httpMethod": "PATCH", + "description": "更新指标", + "parameters": { + "indicator_id": { + "type": "string", + "location": "path", + "required": true, + "description": "指标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "indicator_id" + ], + "requestBody": { + "current_value_calculate_type": { + "type": "integer", + "description": "指标的当前值的计算方式,目标仅支持 0、1;关键结果仅支持 0、2", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于关键结果进度自动更新" + }, + { + "value": "2", + "description": "基于拆解的关键结果进度更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "status_calculate_type": { + "type": "integer", + "description": "指标的状态的计算方式,目标仅支持 0、1、2;关键结果仅支持 0、1", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于进度和当前时间自动更新" + }, + { + "value": "2", + "description": "基于风险最高的关键结果状态更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "start_value": { + "type": "number", + "description": "指标的起始值,不支持目标修改", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "target_value": { + "type": "number", + "description": "指标的目标值,不支持目标修改;不支持有承接记录的关键结果修改", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value": { + "type": "number", + "description": "指标的当前值,不支持基于关键结果进度自动更新的目标修改;不支持基于拆解记录自动更新的关键结果修改", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "unit": { + "type": "object", + "description": "指标的单位,不支持目标修改;不支持有承接记录的关键结果修改", + "required": false, + "ref": "indicator_unit", + "properties": { + "unit_type": { + "type": "integer", + "description": "指标的单位类型", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "公共" + }, + { + "value": "1", + "description": "自定义" + } + ], + "enum": [ + "0", + "1" + ] + }, + "unit_value": { + "type": "string", + "description": "指标单位的值。如果是自定义,字符长度不超过 5;如果单元类型是「公共」,单位值为以下枚举值 百分比:PERCENT;无单位:NONE;元:YUAN;美元:DOLLAR", + "required": true, + "example": "PERCENT" + } + } + }, + "indicator_status": { + "type": "integer", + "description": "指标的状态,只支持指标的状态的计算方式为手动更新时修改", + "required": false, + "example": "0", + "options": [ + { + "value": "-1", + "description": "未定义" + }, + { + "value": "0", + "description": "正常" + }, + { + "value": "1", + "description": "有风险" + }, + { + "value": "2", + "description": "已延期" + } + ], + "enum": [ + "-1", + "0", + "1", + "2" + ] + } + }, + "responseBody": { + "indicator": { + "type": "object", + "description": "指标", + "required": false, + "ref": "indicator", + "properties": { + "id": { + "type": "string", + "description": "指标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "指标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "指标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "entity_type": { + "type": "integer", + "description": "指标所属的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + }, + { + "value": "3", + "description": "关键结果" + } + ], + "enum": [ + "2", + "3" + ] + }, + "entity_id": { + "type": "string", + "description": "指标所属的实体 ID", + "required": true, + "example": "1" + }, + "indicator_status": { + "type": "integer", + "description": "指标的状态", + "required": true, + "example": "0", + "options": [ + { + "value": "-1", + "description": "未定义" + }, + { + "value": "0", + "description": "正常" + }, + { + "value": "1", + "description": "有风险" + }, + { + "value": "2", + "description": "已延期" + } + ], + "enum": [ + "-1", + "0", + "1", + "2" + ] + }, + "status_calculate_type": { + "type": "integer", + "description": "指标的状态的计算方式", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于进度和当前时间自动更新" + }, + { + "value": "2", + "description": "基于风险最高的关键结果状态更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "start_value": { + "type": "number", + "description": "指标的起始值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "target_value": { + "type": "number", + "description": "指标的目标值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value": { + "type": "number", + "description": "指标的当前值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value_calculate_type": { + "type": "integer", + "description": "指标的当前值的计算方", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于关键结果进度自动更新" + }, + { + "value": "2", + "description": "基于拆解的关键结果进度更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "unit": { + "type": "object", + "description": "指标的单位", + "required": false, + "ref": "indicator_unit", + "properties": { + "unit_type": { + "type": "integer", + "description": "指标的单位类型", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "公共" + }, + { + "value": "1", + "description": "自定义" + } + ], + "enum": [ + "0", + "1" + ] + }, + "unit_value": { + "type": "string", + "description": "指标单位的值。如果是自定义,字符长度不超过 5;如果单元类型是「公共」,单位值为以下枚举值 百分比:PERCENT;无单位:NONE;元:YUAN;美元:DOLLAR", + "required": true, + "example": "PERCENT" + } + } + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=okr&resource=okr.indicator&version=v2" + } + } + }, + "key_results": { + "methods": { + "delete": { + "id": "key_results.delete", + "path": "key_results/{key_result_id}", + "httpMethod": "DELETE", + "description": "删除关键结果", + "parameters": { + "key_result_id": { + "type": "string", + "location": "path", + "required": true, + "description": "关键结果 ID", + "example": "1" + } + }, + "parameterOrder": [ + "key_result_id" + ], + "responseBody": { + "key_result_id": { + "type": "string", + "description": "关键结果 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "high-risk-write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=okr&resource=okr.key_result&version=v2" + }, + "get": { + "id": "key_results.get", + "path": "key_results/{key_result_id}", + "httpMethod": "GET", + "description": "获取关键结果", + "parameters": { + "key_result_id": { + "type": "string", + "location": "path", + "required": true, + "description": "关键结果 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "key_result_id" + ], + "responseBody": { + "key_result": { + "type": "object", + "description": "关键结果", + "required": false, + "ref": "key_result", + "properties": { + "id": { + "type": "string", + "description": "关键结果的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "关键结果的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "关键结果的修改时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "objective_id": { + "type": "string", + "description": "关键结果的目标 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "关键结果的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=okr&resource=okr.key_result&version=v2" + }, + "patch": { + "id": "key_results.patch", + "path": "key_results/{key_result_id}", + "httpMethod": "PATCH", + "description": "更新关键结果", + "parameters": { + "key_result_id": { + "type": "string", + "location": "path", + "required": true, + "description": "关键结果 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "key_result_id" + ], + "requestBody": { + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + }, + "responseBody": { + "key_result": { + "type": "object", + "description": "关键结果", + "required": false, + "ref": "key_result", + "properties": { + "id": { + "type": "string", + "description": "关键结果的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "关键结果的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "关键结果的修改时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "objective_id": { + "type": "string", + "description": "关键结果的目标 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "关键结果的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=okr&resource=okr.key_result&version=v2" + } + } + }, + "key_result.indicators": { + "methods": { + "list": { + "id": "key_result.indicators.list", + "path": "key_results/{key_result_id}/indicators", + "httpMethod": "GET", + "description": "获取关键结果的指标", + "parameters": { + "key_result_id": { + "type": "string", + "location": "path", + "required": true, + "description": "关键结果 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "key_result_id" + ], + "responseBody": { + "indicator": { + "type": "object", + "description": "指标", + "required": false, + "ref": "indicator", + "properties": { + "id": { + "type": "string", + "description": "指标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "指标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "指标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "entity_type": { + "type": "integer", + "description": "指标所属的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + }, + { + "value": "3", + "description": "关键结果" + } + ], + "enum": [ + "2", + "3" + ] + }, + "entity_id": { + "type": "string", + "description": "指标所属的实体 ID", + "required": true, + "example": "1" + }, + "indicator_status": { + "type": "integer", + "description": "指标的状态", + "required": true, + "example": "0", + "options": [ + { + "value": "-1", + "description": "未定义" + }, + { + "value": "0", + "description": "正常" + }, + { + "value": "1", + "description": "有风险" + }, + { + "value": "2", + "description": "已延期" + } + ], + "enum": [ + "-1", + "0", + "1", + "2" + ] + }, + "status_calculate_type": { + "type": "integer", + "description": "指标的状态的计算方式", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于进度和当前时间自动更新" + }, + { + "value": "2", + "description": "基于风险最高的关键结果状态更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "start_value": { + "type": "number", + "description": "指标的起始值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "target_value": { + "type": "number", + "description": "指标的目标值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value": { + "type": "number", + "description": "指标的当前值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value_calculate_type": { + "type": "integer", + "description": "指标的当前值的计算方", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于关键结果进度自动更新" + }, + { + "value": "2", + "description": "基于拆解的关键结果进度更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "unit": { + "type": "object", + "description": "指标的单位", + "required": false, + "ref": "indicator_unit", + "properties": { + "unit_type": { + "type": "integer", + "description": "指标的单位类型", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "公共" + }, + { + "value": "1", + "description": "自定义" + } + ], + "enum": [ + "0", + "1" + ] + }, + "unit_value": { + "type": "string", + "description": "指标单位的值。如果是自定义,字符长度不超过 5;如果单元类型是「公共」,单位值为以下枚举值 百分比:PERCENT;无单位:NONE;元:YUAN;美元:DOLLAR", + "required": true, + "example": "PERCENT" + } + } + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.key_result.indicator&version=v2" + } + } + }, + "objectives": { + "methods": { + "delete": { + "id": "objectives.delete", + "path": "objectives/{objective_id}", + "httpMethod": "DELETE", + "description": "删除目标", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + } + }, + "parameterOrder": [ + "objective_id" + ], + "responseBody": { + "objective_id": { + "type": "string", + "description": "目标 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "high-risk-write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=okr&resource=okr.objective&version=v2" + }, + "get": { + "id": "objectives.get", + "path": "objectives/{objective_id}", + "httpMethod": "GET", + "description": "获取目标", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "responseBody": { + "objective": { + "type": "object", + "description": "目标", + "required": false, + "ref": "objective", + "properties": { + "id": { + "type": "string", + "description": "目标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "目标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "目标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "cycle_id": { + "type": "string", + "description": "目标的用户周期 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "目标的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=okr&resource=okr.objective&version=v2" + }, + "key_results_position": { + "id": "objectives.key_results_position", + "path": "objectives/{objective_id}/key_results_position", + "httpMethod": "PUT", + "description": "更新全部关键结果的位置", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "requestBody": { + "key_result_ids": { + "type": "array", + "description": "关键结果 ID 列表,按照序号顺序", + "required": true + } + }, + "responseBody": { + "items": { + "type": "array", + "description": "关键结果列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "关键结果的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "关键结果的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "关键结果的修改时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "objective_id": { + "type": "string", + "description": "关键结果的目标 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "关键结果的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=key_results_position&project=okr&resource=okr.objective&version=v2" + }, + "key_results_weight": { + "id": "objectives.key_results_weight", + "path": "objectives/{objective_id}/key_results_weight", + "httpMethod": "PUT", + "description": "更新全部关键结果的权重", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "requestBody": { + "key_result_weights": { + "type": "array", + "description": "关键结果权重列表", + "required": true, + "properties": { + "key_result_id": { + "type": "string", + "description": "关键结果 ID", + "required": true, + "example": "1" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": true, + "example": "0.5", + "max": "1", + "min": "0" + } + } + } + }, + "responseBody": { + "items": { + "type": "array", + "description": "关键结果列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "关键结果的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "关键结果的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "关键结果的修改时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "objective_id": { + "type": "string", + "description": "关键结果的目标 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "关键结果的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=key_results_weight&project=okr&resource=okr.objective&version=v2" + }, + "patch": { + "id": "objectives.patch", + "path": "objectives/{objective_id}", + "httpMethod": "PATCH", + "description": "更新目标", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "requestBody": { + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + }, + "responseBody": { + "objective": { + "type": "object", + "description": "目标", + "required": false, + "ref": "objective", + "properties": { + "id": { + "type": "string", + "description": "目标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "目标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "目标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "cycle_id": { + "type": "string", + "description": "目标的用户周期 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "目标的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "目标的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "notes": { + "type": "object", + "description": "目标的备注", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + }, + "category_id": { + "type": "string", + "description": "目标的分类 ID", + "required": false, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=okr&resource=okr.objective&version=v2" + } + } + }, + "objective.alignments": { + "methods": { + "create": { + "id": "objective.alignments.create", + "path": "objectives/{objective_id}/alignments", + "httpMethod": "POST", + "description": "创建对齐关系", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + } + }, + "parameterOrder": [ + "objective_id" + ], + "requestBody": { + "to_entity_type": { + "type": "integer", + "description": "被对齐实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + } + ], + "enum": [ + "2" + ] + }, + "to_entity_id": { + "type": "string", + "description": "被对齐实体 ID", + "required": true, + "example": "1" + } + }, + "responseBody": { + "alignment_id": { + "type": "string", + "description": "对齐 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=okr&resource=okr.objective.alignment&version=v2" + }, + "list": { + "id": "objective.alignments.list", + "path": "objectives/{objective_id}/alignments", + "httpMethod": "GET", + "description": "批量获取目标下的对齐关系", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "分页大小,最大 100", + "default": "10", + "max": "100", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页键,首个分页键传入空串", + "default": "", + "example": "1" + }, + "align_type": { + "type": "string", + "location": "query", + "required": false, + "description": "对齐类型", + "default": "", + "options": [ + { + "value": "aligned", + "description": "被对齐" + }, + { + "value": "aligning", + "description": "对齐" + } + ] + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "responseBody": { + "has_more": { + "type": "boolean", + "description": "是否有下一页", + "required": false + }, + "page_token": { + "type": "string", + "description": "分页键,下一个分页需传入该键", + "required": false, + "example": "1" + }, + "items": { + "type": "array", + "description": "对齐列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "对齐的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "对齐的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "对齐的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "from_owner": { + "type": "object", + "description": "发起对齐的所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "to_owner": { + "type": "object", + "description": "被对齐的所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "from_entity_type": { + "type": "integer", + "description": "发起对齐的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + } + ], + "enum": [ + "2" + ] + }, + "from_entity_id": { + "type": "string", + "description": "发起对齐的实体 ID", + "required": true, + "example": "1" + }, + "to_entity_type": { + "type": "integer", + "description": "被对齐的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + } + ], + "enum": [ + "2" + ] + }, + "to_entity_id": { + "type": "string", + "description": "被对齐的实体 ID", + "required": true, + "example": "1" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.objective.alignment&version=v2" + } + } + }, + "objective.indicators": { + "methods": { + "list": { + "id": "objective.indicators.list", + "path": "objectives/{objective_id}/indicators", + "httpMethod": "GET", + "description": "获取目标的指标", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "responseBody": { + "indicator": { + "type": "object", + "description": "指标", + "required": false, + "ref": "indicator", + "properties": { + "id": { + "type": "string", + "description": "指标的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "指标的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "指标的更新时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "entity_type": { + "type": "integer", + "description": "指标所属的实体类型", + "required": true, + "example": "2", + "options": [ + { + "value": "2", + "description": "目标" + }, + { + "value": "3", + "description": "关键结果" + } + ], + "enum": [ + "2", + "3" + ] + }, + "entity_id": { + "type": "string", + "description": "指标所属的实体 ID", + "required": true, + "example": "1" + }, + "indicator_status": { + "type": "integer", + "description": "指标的状态", + "required": true, + "example": "0", + "options": [ + { + "value": "-1", + "description": "未定义" + }, + { + "value": "0", + "description": "正常" + }, + { + "value": "1", + "description": "有风险" + }, + { + "value": "2", + "description": "已延期" + } + ], + "enum": [ + "-1", + "0", + "1", + "2" + ] + }, + "status_calculate_type": { + "type": "integer", + "description": "指标的状态的计算方式", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于进度和当前时间自动更新" + }, + { + "value": "2", + "description": "基于风险最高的关键结果状态更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "start_value": { + "type": "number", + "description": "指标的起始值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "target_value": { + "type": "number", + "description": "指标的目标值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value": { + "type": "number", + "description": "指标的当前值", + "required": false, + "example": "0", + "max": "99999999999", + "min": "-99999999999" + }, + "current_value_calculate_type": { + "type": "integer", + "description": "指标的当前值的计算方", + "required": false, + "example": "0", + "options": [ + { + "value": "0", + "description": "手动更新" + }, + { + "value": "1", + "description": "基于关键结果进度自动更新" + }, + { + "value": "2", + "description": "基于拆解的关键结果进度更新" + } + ], + "enum": [ + "0", + "1", + "2" + ] + }, + "unit": { + "type": "object", + "description": "指标的单位", + "required": false, + "ref": "indicator_unit", + "properties": { + "unit_type": { + "type": "integer", + "description": "指标的单位类型", + "required": true, + "example": "0", + "options": [ + { + "value": "0", + "description": "公共" + }, + { + "value": "1", + "description": "自定义" + } + ], + "enum": [ + "0", + "1" + ] + }, + "unit_value": { + "type": "string", + "description": "指标单位的值。如果是自定义,字符长度不超过 5;如果单元类型是「公共」,单位值为以下枚举值 百分比:PERCENT;无单位:NONE;元:YUAN;美元:DOLLAR", + "required": true, + "example": "PERCENT" + } + } + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.objective.indicator&version=v2" + } + } + }, + "objective.key_results": { + "methods": { + "create": { + "id": "objective.key_results.create", + "path": "objectives/{objective_id}/key_results", + "httpMethod": "POST", + "description": "创建关键结果", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标 ID", + "example": "1" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "requestBody": { + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false, + "properties": { + "block_element_type": { + "type": "string", + "description": "文档元素类型", + "required": false, + "example": "paragraph", + "options": [ + { + "value": "paragraph", + "description": "文本段落" + }, + { + "value": "gallery", + "description": "图片" + } + ], + "enum": [ + "paragraph", + "gallery" + ] + }, + "paragraph": { + "type": "object", + "description": "文本段落", + "required": false, + "ref": "content_paragraph" + }, + "gallery": { + "type": "object", + "description": "图片", + "required": false, + "ref": "content_gallery" + } + } + } + } + }, + "deadline": { + "type": "string", + "description": "关键结果的截止时间", + "required": false, + "example": "1760604634563" + }, + "score": { + "type": "number", + "description": "目标的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + } + }, + "responseBody": { + "key_result_id": { + "type": "string", + "description": "关键结果 ID", + "required": false, + "example": "1" + } + }, + "scopes": [ + "okr:okr.content:writeonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=okr&resource=okr.objective.key_result&version=v2" + }, + "list": { + "id": "objective.key_results.list", + "path": "objectives/{objective_id}/key_results", + "httpMethod": "GET", + "description": "批量获取目标下的关键结果", + "parameters": { + "objective_id": { + "type": "string", + "location": "path", + "required": true, + "description": "目标", + "example": "1" + }, + "page_size": { + "type": "integer", + "location": "query", + "required": false, + "description": "分页大小,最大 100", + "default": "10", + "max": "100", + "min": "1" + }, + "page_token": { + "type": "string", + "location": "query", + "required": false, + "description": "分页键,首个分页键传入空串", + "default": "" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户 ID 的类型", + "default": "open_id", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ] + }, + "department_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的部门 ID 的类型", + "default": "open_department_id", + "options": [ + { + "value": "department_id", + "description": "以department_id来识别部门" + }, + { + "value": "open_department_id", + "description": "以open_department_id来识别部门" + } + ] + } + }, + "parameterOrder": [ + "objective_id" + ], + "responseBody": { + "has_more": { + "type": "boolean", + "description": "是否有下一页", + "required": false + }, + "page_token": { + "type": "string", + "description": "分页键,下一个分页需传入该键", + "required": false + }, + "items": { + "type": "array", + "description": "关键结果列表", + "required": false, + "properties": { + "id": { + "type": "string", + "description": "关键结果的 ID", + "required": true, + "example": "1" + }, + "create_time": { + "type": "string", + "description": "关键结果的创建时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "update_time": { + "type": "string", + "description": "关键结果的修改时间,时间戳", + "required": true, + "example": "1760604634563" + }, + "owner": { + "type": "object", + "description": "所有者", + "required": true, + "ref": "owner", + "properties": { + "owner_type": { + "type": "string", + "description": "所有者类型", + "required": true, + "example": "user", + "options": [ + { + "value": "user", + "description": "员工" + } + ], + "enum": [ + "user" + ] + }, + "user_id": { + "type": "string", + "description": "员工 ID", + "required": false, + "example": "ou_3bbe8a09c20e89cce9bff989ed840674", + "annotations": [ + "open:x_user_id", + "tolerate_idtrans_failure" + ] + } + } + }, + "objective_id": { + "type": "string", + "description": "关键结果的目标 ID", + "required": true, + "example": "1" + }, + "position": { + "type": "integer", + "description": "关键结果的序号:从 1 开始计数", + "required": true, + "example": "1", + "max": "100", + "min": "1" + }, + "content": { + "type": "object", + "description": "关键结果的内容", + "required": false, + "ref": "content_block", + "properties": { + "blocks": { + "type": "array", + "description": "文档结构是按行排列的,每行内容是一个 Block", + "required": false + } + } + }, + "score": { + "type": "number", + "description": "关键结果的分数:[0,1],支持一位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "weight": { + "type": "number", + "description": "目标的权重:[0,1],支持三位小数", + "required": false, + "example": "0.5", + "max": "1", + "min": "0" + }, + "deadline": { + "type": "string", + "description": "目标的截止时间,时间戳", + "required": false, + "example": "1760604634563" + } + } + } + }, + "scopes": [ + "okr:okr.content:readonly" + ], + "accessTokens": [ + "user", + "tenant" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=okr&resource=okr.objective.key_result&version=v2" + } + } + } + } + }, + { + "name": "sheets", + "version": "v3", + "title": "电子表格 API", + "description": "电子表格操作", + "servicePath": "/open-apis/sheets/v3", + "resources": { + "spreadsheets": { + "methods": { + "create": { + "id": "spreadsheet.create", + "path": "spreadsheets", + "httpMethod": "POST", + "description": "创建电子表格", + "requestBody": { + "title": { + "type": "string", + "description": "表格标题", + "required": false, + "example": "Sales sheet" + }, + "folder_token": { + "type": "string", + "description": "文件夹 token。你可通过以下两种方式获取文件夹的 token:;- 文件夹的 URL:https://sample.feishu.cn/drive/folder/==fldbcO1UuPz8VwnpPx5a92abcef==;- 调用开放平台接口获取:; - 调用[获取我的空间(root folder)元数据](https://open.feishu.cn/document/ukTMukTMukTM/ugTNzUjL4UzM14CO1MTN/get-root-folder-meta)接口获取根目录(即根文件夹)的 token。; - 继续调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)接口,获取根目录下文件夹的 token。;;;**提示**:要在知识库中创建电子表格,你需调用[创建知识空间节点](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/create)接口,并选择表格(sheet)类型。", + "required": false, + "example": "fldbcO1UuPz8VwnpPx5a92abcef" + }, + "without_mount": { + "type": "boolean", + "description": "是否挂载到云空间", + "required": false, + "example": "false", + "annotations": [ + "writeOnly" + ] + } + }, + "responseBody": { + "spreadsheet": { + "type": "object", + "description": "电子表格的基础信息", + "required": false, + "ref": "spreadsheet", + "properties": { + "title": { + "type": "string", + "description": "电子表格标题", + "required": false, + "example": "Sales sheet" + }, + "folder_token": { + "type": "string", + "description": "文件夹 token", + "required": false, + "example": "fldbcO1UuPz8VwnpPx5a92abcef" + }, + "url": { + "type": "string", + "description": "电子表格的 URL 链接", + "required": false, + "example": "https://example.feishu.cn/sheets/Iow7sNNEphp3WbtnbCscPqabcef", + "annotations": [ + "readOnly" + ] + }, + "spreadsheet_token": { + "type": "string", + "description": "电子表格 token", + "required": false, + "example": "Iow7sNNEphp3WbtnbCscPqabcef", + "annotations": [ + "readOnly" + ] + }, + "without_mount": { + "type": "boolean", + "description": "是否挂载到云空间", + "required": false, + "example": "false", + "annotations": [ + "writeOnly" + ] + } + } + } + }, + "scopes": [ + "drive:drive", + "sheets:spreadsheet", + "sheets:spreadsheet:create" + ], + "accessTokens": [ + "tenant", + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/create" + }, + "get": { + "id": "spreadsheet.get", + "path": "spreadsheets/{spreadsheet_token}", + "httpMethod": "GET", + "description": "获取电子表格信息", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "user_id_type": { + "type": "string", + "location": "query", + "required": false, + "description": "此次调用中使用的用户ID的类型", + "default": "", + "options": [ + { + "value": "user_id", + "description": "以user_id来识别用户" + }, + { + "value": "union_id", + "description": "以union_id来识别用户" + }, + { + "value": "open_id", + "description": "以open_id来识别用户" + } + ], + "enumName": "GetSpreadsheetUserIDType" + } + }, + "parameterOrder": [ + "spreadsheet_token" + ], + "responseBody": { + "spreadsheet": { + "type": "object", + "description": "电子表格的基础信息", + "required": false, + "ref": "get_spreadsheet", + "properties": { + "title": { + "type": "string", + "description": "电子表格标题", + "required": false, + "example": "title" + }, + "owner_id": { + "type": "string", + "description": "电子表格的所有者 ID。ID 类型由查询参数 user_id_type 决定。", + "required": false, + "example": "ou_48d0958ee4b2ab3eaf0b5f6c968abcef", + "annotations": [ + "readOnly", + "open:x_user_id" + ] + }, + "token": { + "type": "string", + "description": "电子表格 token", + "required": false, + "example": "Iow7sNNEphp3WbtnbCscPqabcef", + "annotations": [ + "readOnly" + ] + }, + "url": { + "type": "string", + "description": "电子表格的 URL 链接", + "required": false, + "example": "https://example.feishu.cn/sheets/Iow7sNNEphp3WbtnbCscPqabcef", + "annotations": [ + "readOnly" + ] + } + } + } + }, + "scopes": [ + "sheets:spreadsheet", + "sheets:spreadsheet:readonly", + "drive:drive", + "drive:drive:readonly", + "sheets:spreadsheet.meta:read" + ], + "accessTokens": [ + "tenant", + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/get" + }, + "patch": { + "id": "spreadsheet.patch", + "path": "spreadsheets/{spreadsheet_token}", + "httpMethod": "PATCH", + "description": "修改电子表格属性", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + } + }, + "parameterOrder": [ + "spreadsheet_token" + ], + "requestBody": { + "title": { + "type": "string", + "description": "新的电子表格标题。参数为空时,表格标题将显示为“未命名表格”或本地语言环境对应内容。", + "required": false, + "example": "Sales sheet" + } + }, + "scopes": [ + "sheets:spreadsheet", + "drive:drive", + "sheets:spreadsheet.meta:write_only" + ], + "accessTokens": [ + "tenant", + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/patch" + } + } + }, + "spreadsheet.sheet.filters": { + "methods": { + "create": { + "id": "spreadsheet.sheet.filter.create", + "path": "spreadsheets/{spreadsheet_token}/sheets/{sheet_id}/filter", + "httpMethod": "POST", + "description": "创建筛选", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "sheet_id": { + "type": "string", + "location": "path", + "required": true, + "description": "工作表 ID,通过[获取工作表](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query) 获取。", + "example": "8fe9d6" + } + }, + "parameterOrder": [ + "spreadsheet_token", + "sheet_id" + ], + "requestBody": { + "range": { + "type": "string", + "description": "设置筛选的应用范围。支持以下五种写法,了解更多,参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)。;;- `sheetId`:填写实际的工作表 ID,表示将筛选应用于整表;- `sheetId!{开始行索引}:{结束行索引}` :填写工作表 ID 和行数区间,表示将筛选应用于整行;- `sheetId!{开始列索引}:{结束列索引}`:填写工作表 ID 和列的区间,表示将筛选应用于整列;- `sheetId!{开始单元格}:{结束单元格}`:填写工作表 ID 和单元格区间,表示将筛选应用于单元格选定的区域中;- `sheetId!{开始单元格}:{结束列索引}`:填写工作表 ID、起始单元格和结束列,表示省略结束行,使用表格的最后行作为结束行", + "required": true, + "example": "8fe9d6!A1:H14" + }, + "col": { + "type": "string", + "description": "设置应用筛选条件的列。", + "required": true, + "example": "E" + }, + "condition": { + "type": "object", + "description": "设置筛选条件。", + "required": true, + "ref": "condition", + "properties": { + "filter_type": { + "type": "string", + "description": "筛选类型,枚举值如下所示。了解更多,参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)。;- multiValue :多值筛选;- number :数字筛选;- text :文本筛选;- color :颜色筛选", + "required": true, + "example": "number" + }, + "compare_type": { + "type": "string", + "description": "比较类型", + "required": false, + "example": "less" + }, + "expected": { + "type": "array", + "description": "筛选参数", + "required": true + } + } + } + }, + "scopes": [ + "sheets:spreadsheet", + "drive:drive", + "sheets:spreadsheet:write_only" + ], + "accessTokens": [ + "tenant", + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/create" + }, + "delete": { + "id": "spreadsheet.sheet.filter.delete", + "path": "spreadsheets/{spreadsheet_token}/sheets/{sheet_id}/filter", + "httpMethod": "DELETE", + "description": "删除筛选", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "sheet_id": { + "type": "string", + "location": "path", + "required": true, + "description": "工作表 ID,通过[获取工作表](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query) 获取。", + "example": "8fe9d6" + } + }, + "parameterOrder": [ + "spreadsheet_token", + "sheet_id" + ], + "scopes": [ + "sheets:spreadsheet", + "drive:drive", + "sheets:spreadsheet:write_only" + ], + "accessTokens": [ + "tenant", + "user" + ], + "danger": true, + "risk": "high-risk-write", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/delete" + }, + "get": { + "id": "spreadsheet.sheet.filter.get", + "path": "spreadsheets/{spreadsheet_token}/sheets/{sheet_id}/filter", + "httpMethod": "GET", + "description": "获取筛选", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "sheet_id": { + "type": "string", + "location": "path", + "required": true, + "description": "工作表 ID,通过[获取工作表](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query) 获取。", + "example": "8fe9d6" + } + }, + "parameterOrder": [ + "spreadsheet_token", + "sheet_id" + ], + "responseBody": { + "sheet_filter_info": { + "type": "object", + "description": "筛选信息", + "required": false, + "ref": "sheet_filter_info", + "properties": { + "range": { + "type": "string", + "description": "筛选的应用范围", + "required": true, + "example": "8fe9d6!A1:H14" + }, + "filtered_out_rows": { + "type": "array", + "description": "被筛选条件过滤掉的行。从 1 开始索引。", + "required": true + }, + "filter_infos": { + "type": "array", + "description": "工作表的筛选条件", + "required": true, + "properties": { + "col": { + "type": "string", + "description": "设置了筛选条件的列", + "required": true, + "example": "E" + }, + "conditions": { + "type": "array", + "description": "筛选条件", + "required": true + } + } + } + } + } + }, + "scopes": [ + "drive:drive", + "drive:drive:readonly", + "sheets:spreadsheet", + "sheets:spreadsheet:readonly", + "sheets:spreadsheet:read" + ], + "accessTokens": [ + "tenant", + "user" + ], + "risk": "read", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/get" + }, + "update": { + "id": "spreadsheet.sheet.filter.update", + "path": "spreadsheets/{spreadsheet_token}/sheets/{sheet_id}/filter", + "httpMethod": "PUT", + "description": "更新筛选", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "sheet_id": { + "type": "string", + "location": "path", + "required": true, + "description": "工作表 ID,通过[获取工作表](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query) 获取。", + "example": "8fe9d6" + } + }, + "parameterOrder": [ + "spreadsheet_token", + "sheet_id" + ], + "requestBody": { + "col": { + "type": "string", + "description": "指定要更新筛选条件的列。", + "required": true, + "example": "G" + }, + "condition": { + "type": "object", + "description": "设置筛选条件。", + "required": true, + "ref": "condition", + "properties": { + "filter_type": { + "type": "string", + "description": "筛选类型,枚举值如下所示。了解更多,参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)。;- multiValue :多值筛选;- number :数字筛选;- text :文本筛选;- color :颜色筛选;- clear :清除某列的筛选条件", + "required": true, + "example": "text" + }, + "compare_type": { + "type": "string", + "description": "比较类型。不同筛选类型的比较类型的枚举值不同,详情参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)。", + "required": false, + "example": "beginsWith" + }, + "expected": { + "type": "array", + "description": "筛选参数。不同筛选类型的筛选参数限制不同,详情参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)。", + "required": true + } + } + } + }, + "scopes": [ + "sheets:spreadsheet", + "drive:drive", + "sheets:spreadsheet:write_only" + ], + "accessTokens": [ + "tenant", + "user" + ], + "danger": true, + "risk": "write", + "docUrl": "https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/update" + } + } + }, + "spreadsheet.sheets": { + "methods": { + "find": { + "id": "spreadsheet.sheet.find", + "path": "spreadsheets/{spreadsheet_token}/sheets/{sheet_id}/find", + "httpMethod": "POST", + "description": "查找单元格", + "parameters": { + "spreadsheet_token": { + "type": "string", + "location": "path", + "required": true, + "description": "电子表格的 token。可通过以下两种方式获取。了解更多,参考[电子表格概述](https://open.feishu.cn/document/ukTMukTMukTM/uATMzUjLwEzM14CMxMTN/overview)。;- 电子表格的 URL:https://sample.feishu.cn/sheets/==Iow7sNNEphp3WbtnbCscPqabcef==;- 调用[获取文件夹中的文件清单](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list)", + "example": "Iow7sNNEphp3WbtnbCscPqabcef" + }, + "sheet_id": { + "type": "string", + "location": "path", + "required": true, + "description": "工作表的 ID,获取方式见[获取工作表](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query)。", + "example": "PNIfrm" + } + }, + "parameterOrder": [ + "spreadsheet_token", + "sheet_id" + ], + "requestBody": { + "find_condition": { + "type": "object", + "description": "指定查找单元格的条件。", + "required": true, + "ref": "find_condition", + "properties": { + "range": { + "type": "string", + "description": "查找范围。格式为 `inserted element
你好
' +``` + +**别名发信:** + +```bash +# --mailbox 指定所属邮箱,--from 指定别名地址 +lark-cli mail +send --mailbox me --from alias@example.com \ + --to bob@example.com --subject '测试' --body '你好
' +``` + +不使用公共邮箱或别名时无需指定 `--mailbox`,行为与之前一致。 + +### 发送后确认投递状态 + +**立即发送(无 `--send-time`)**:邮件发送成功后(收到 `message_id`),**必须**调用 `send_status` API 查询投递状态并向用户报告: + +```bash +lark-cli mail user_mailbox.messages send_status --params '{"user_mailbox_id":"me","message_id":"<发送返回的 message_id>"}' +``` + +返回每个收件人的投递状态(`status`):1=正在投递, 2=投递失败重试, 3=退信, 4=投递成功, 5=待审批, 6=审批拒绝。向用户简要报告结果,如有异常状态(退信/审批拒绝)需重点提示。 + +**定时发送(指定了 `--send-time`)**:定时发送不会立即产生 `message_id`,`send_status` 在定时发送成功后会返回"待发送"状态,**不建议在定时发送后立即查询**。可在预定发送时间后再查询。如需取消定时发送: + +```bash +lark-cli mail user_mailbox.drafts cancel_scheduled_send --params '{"user_mailbox_id":"me","draft_id":"请参加本次产品评审会议。
' \ + --event-summary '产品评审' \ + --event-start '2026-05-10T14:00+08:00' \ + --event-end '2026-05-10T15:00+08:00' \ + --event-location '5F 大会议室' \ + --confirm-send +``` + +**参数说明:** +- `--event-summary`:日程标题,设置此参数即开启日程邀请模式,需同时设置 `--event-start` 和 `--event-end` +- `--event-start` / `--event-end`:ISO 8601 格式时间,如 `2026-05-10T14:00+08:00` +- `--event-location`:可选,日程地点 + +**约束:** +- `--event-*` 与 `--send-time`(定时发送)互斥,不可同时使用 +- `Bcc` 收件人不会成为日程参会人;如果邮件同时包含 Bcc 和日程,后端在发送时会拒绝该请求 + +读取含日程邀请的邮件时,`calendar_event` 字段包含日程详情(`method`、`summary`、`start`、`end`、`organizer`、`attendees` 等)。 + +### 正文格式:优先使用 HTML + +撰写邮件正文时,**默认使用 HTML 格式**(body 内容会被自动检测)。仅当用户明确要求纯文本时,才使用 `--plain-text` 标志强制纯文本模式。 - HTML 支持粗体、列表、链接、段落等富文本排版,收件人阅读体验更好 -- 简单正文直接使用常规 `` / `