Skip to content

日历日程 - 租户令牌

IFeishuTenantV4CalendarEvent

功能描述

日程是存在于日历内的实例资源,开发人员可以通过关联特定日期或时间段、参与人、地点等规则,构建指定主题内容的工作安排。包括日程的 CRUD 操作、搜索、回复、参与人管理、会议群管理、会议纪要以及请假日程等功能。

参考文档

函数列表

函数名称功能描述认证方式HTTP 方法
CreateCalendarEventAsync创建日程租户令牌POST
DeleteCalendarEventAsync删除日程租户令牌DELETE
UpdateCalendarEventAsync更新日程租户令牌PATCH
GetCalendarEventAsync获取日程租户令牌GET
GetCalendarEventPageListAsync获取日程列表租户令牌GET
SearchCalendarEventPageListAsync搜索日程租户令牌POST
ReplyCalendarEventAsync回复日程租户令牌POST
GetInstancesCalendarEventPageListAsync获取重复日程实例租户令牌GET
GetInstanceViewCalendarEventAsync查询日程视图租户令牌GET
CreateCalendarEventMeetingChatAsync创建会议群租户令牌POST
DeleteCalendarEventMeetingChatAsync解绑会议群租户令牌DELETE
CreateCalendarEventMeetingMinuteAsync创建会议纪要租户令牌POST
QueryMeetingRoomFreebusyAsync查询会议室忙闲租户令牌GET
CreateCalendarEventAttendeeAsync添加日程参与人租户令牌POST
DeleteCalendarEventAttendeeAsync删除日程参与人租户令牌DELETE
GetCalendarEventAttendeePageListAsync分页获取日程参与人列表租户令牌GET
GetCalendarEventAttendeeChatMemberPageListAsync获取日程参与群成员列表租户令牌GET
CreateTimeoffEventAsync创建请假日程租户令牌POST
DeleteTimeoffEventAsync删除请假日程租户令牌DELETE
GetMeetingRoomSummaryAsync查询会议室日程主题和详情租户令牌POST
ReplyMeetingRoomEventInstanceAsync回复会议室日程实例租户令牌POST

函数详细内容

CreateCalendarEventAsync

在指定日历上创建一个日程。

函数签名

csharp
Task<FeishuApiResult<CalendarEventOopsResult>?> CreateCalendarEventAsync(
    string calendar_id,
    CreateCalendarEventRequest createCalendarEventRequest,
    string? idempotency_key = null,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
createCalendarEventRequestCreateCalendarEventRequest创建日程请求体-
idempotency_keystring幂等 key,避免重复创建25fdf41b-8c80-2ce1-e94c-de8b5e7aa7e6
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

代码示例

csharp
var request = new CreateCalendarEventRequest
{
    Summary = "项目周会",
    StartTime = new TimeInfo { Timestamp = "1704067200" },
    EndTime = new TimeInfo { Timestamp = "1704070800" }
};
var result = await api.CreateCalendarEventAsync(
    calendar_id: "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn",
    createCalendarEventRequest: request
);

DeleteCalendarEventAsync

删除指定日历上的一个日程。

函数签名

csharp
Task<FeishuNullDataApiResult?> DeleteCalendarEventAsync(
    string calendar_id,
    string event_id,
    bool? need_notification = true,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
need_notificationbool?是否发送 Bot 通知,默认 truefalse
cancellationTokenCancellationToken取消操作令牌对象default

UpdateCalendarEventAsync

更新指定日历上的一个日程。

函数签名

csharp
Task<FeishuApiResult<CalendarEventOopsResult>?> UpdateCalendarEventAsync(
    string calendar_id,
    string event_id,
    UpdateCalendarEventRequest updateCalendarEventRequest,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
updateCalendarEventRequestUpdateCalendarEventRequest更新日程请求体-
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

GetCalendarEventAsync

获取指定日历内的某一日程信息。

函数签名

csharp
Task<FeishuApiResult<GetCalendarEventResult>?> GetCalendarEventAsync(
    string calendar_id,
    string event_id,
    bool? need_meeting_settings = false,
    bool? need_attendee = null,
    int? max_attendee_num = 10,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
need_meeting_settingsbool?是否返回 VC 会前设置false
need_attendeebool?是否返回参与人信息false
max_attendee_numint?最大参与人数量10
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

GetCalendarEventPageListAsync

获取指定日历内的日程列表,支持分页、增量同步、时间范围查询。

函数签名

csharp
Task<FeishuApiResult<GetCalendarEventPageListResult>?> GetCalendarEventPageListAsync(
    string calendar_id,
    int page_size = 20,
    string? page_token = null,
    string? anchor_time = null,
    string? sync_token = null,
    string? start_time = null,
    string? end_time = null,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
page_sizeint分页大小20
page_tokenstring分页标记-
anchor_timestring时间锚点,Unix 时间戳(秒)1609430400
sync_tokenstring增量同步标记-
start_timestring开始时间,Unix 时间戳(秒)1631777271
end_timestring结束时间,Unix 时间戳(秒)1631777271
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

SearchCalendarEventPageListAsync

搜索指定日历下的相关日程。

函数签名

csharp
Task<FeishuApiPageListResult<SearchCalendarEventResult>?> SearchCalendarEventPageListAsync(
    string calendar_id,
    SearchCalendarEventRequest searchCalendarEventRequest,
    int page_size = 20,
    string? page_token = null,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
searchCalendarEventRequestSearchCalendarEventRequest搜索日程请求体-
page_sizeint分页大小20
page_tokenstring分页标记-
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

ReplyCalendarEventAsync

回复日程(接受/拒绝/待定)。

函数签名

csharp
Task<FeishuNullDataApiResult?> ReplyCalendarEventAsync(
    string calendar_id,
    string event_id,
    ReplyCalendarEventRequest replyCalendarEventRequest,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
replyCalendarEventRequestReplyCalendarEventRequest回复日程请求体-
cancellationTokenCancellationToken取消操作令牌对象default

GetInstancesCalendarEventPageListAsync

获取重复日程的实例信息。

函数签名

csharp
Task<FeishuApiPageListResult<CalendarEventInstanceResult>?> GetInstancesCalendarEventPageListAsync(
    string calendar_id,
    string event_id,
    string start_time,
    string end_time,
    int page_size = 50,
    string? page_token = null,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
start_timestring开始时间,Unix 时间戳(秒)1631777271
end_timestring结束时间,Unix 时间戳(秒)1631777271
page_sizeint分页大小50
page_tokenstring分页标记-
cancellationTokenCancellationToken取消操作令牌对象default

说明

  • start_time 与 end_time 之间的时间区间不能超过 2 年

GetInstanceViewCalendarEventAsync

查询日程视图,将重复日程按规则展开为多个实例。

函数签名

csharp
Task<FeishuApiResult<GetInstanceViewCalendarEventResult>?> GetInstanceViewCalendarEventAsync(
    string calendar_id,
    string start_time,
    string end_time,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
start_timestring开始时间,Unix 时间戳(秒)1631777271
end_timestring结束时间,Unix 时间戳(秒)1631777271
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

CreateCalendarEventMeetingChatAsync

为指定日程创建一个会议群。

函数签名

csharp
Task<FeishuApiResult<CreateCalendarEventMeetingChatResult>?> CreateCalendarEventMeetingChatAsync(
    string calendar_id,
    string event_id,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
cancellationTokenCancellationToken取消操作令牌对象default

DeleteCalendarEventMeetingChatAsync

为日程解绑已创建的会议群。

函数签名

csharp
Task<FeishuNullDataApiResult?> DeleteCalendarEventMeetingChatAsync(
    string calendar_id,
    string event_id,
    string meeting_chat_id,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
meeting_chat_idstring会议群 IDoc_xxx
cancellationTokenCancellationToken取消操作令牌对象default

CreateCalendarEventMeetingMinuteAsync

为指定日程创建会议纪要,返回纪要文档 URL。

函数签名

csharp
Task<FeishuApiResult<CreateCalendarEventMeetingMinuteResult>?> CreateCalendarEventMeetingMinuteAsync(
    string calendar_id,
    string event_id,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
cancellationTokenCancellationToken取消操作令牌对象default

QueryMeetingRoomFreebusyAsync

获取指定会议室的忙碌/空闲日程信息。

函数签名

csharp
Task<FeishuApiResult<QueryMeetingRoomFreebusyResult>?> QueryMeetingRoomFreebusyAsync(
    string[] room_ids,
    string time_min,
    string time_max,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
room_idsstring[]会议室 ID 列表(不超过 20 个)["omm_xxxx"]
time_minstring查询起始时间,RFC3339 格式2019-09-04T08:45:00+08:00
time_maxstring查询结束时间,RFC3339 格式2019-09-04T09:45:00+08:00
cancellationTokenCancellationToken取消操作令牌对象default

CreateCalendarEventAttendeeAsync

为指定日程添加一个或多个参与人。

函数签名

csharp
Task<FeishuApiResult<CreateCalendarEventAttendeeResult>?> CreateCalendarEventAttendeeAsync(
    string calendar_id,
    string event_id,
    CreateCalendarEventAttendeeRequest createCalendarEventAttendeeRequest,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
createCalendarEventAttendeeRequestCreateCalendarEventAttendeeRequest创建参与人请求体-
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

DeleteCalendarEventAttendeeAsync

删除指定日程的一个或多个参与人。

函数签名

csharp
Task<FeishuNullDataApiResult?> DeleteCalendarEventAttendeeAsync(
    string calendar_id,
    string event_id,
    DeleteCalendarEventAttendeeRequest deleteCalendarEventAttendeeRequest,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
deleteCalendarEventAttendeeRequestDeleteCalendarEventAttendeeRequest删除参与人请求体-
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

GetCalendarEventAttendeePageListAsync

分页获取日程的参与人列表。

函数签名

csharp
Task<FeishuApiPageListResult<CalendarEventAttendeeInfoResult>?> GetCalendarEventAttendeePageListAsync(
    string calendar_id,
    string event_id,
    bool? need_resource_customization = null,
    string? page_token = null,
    int? page_size = 20,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
need_resource_customizationbool?是否需要会议室表单信息true
page_tokenstring分页标记-
page_sizeint?分页大小20
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

GetCalendarEventAttendeeChatMemberPageListAsync

获取日程的群组类型参与人的群成员列表。

函数签名

csharp
Task<FeishuApiPageListResult<CalendarEventAttendeeChatMember>?> GetCalendarEventAttendeeChatMemberPageListAsync(
    string calendar_id,
    string event_id,
    string attendee_id,
    string? page_token = null,
    int? page_size = 20,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
calendar_idstring日历 IDfeishu.cn_xxxxxxxxxx@group.calendar.feishu.cn
event_idstring日程 IDxxxxxxxxx_0
attendee_idstring群组类型参与人 IDchat_xxxxxx
page_tokenstring分页标记-
page_sizeint?分页大小20
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

CreateTimeoffEventAsync

为指定用户创建一个请假日程。请假期间用户个人签名页会展示请假信息。

函数签名

csharp
Task<FeishuApiResult<CreateTimeoffEventResult>?> CreateTimeoffEventAsync(
    CreateTimeoffEventRequest createTimeoffEventRequest,
    string? user_id_type = "open_id",
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
createTimeoffEventRequestCreateTimeoffEventRequest创建请假日程请求体-
user_id_typestring用户 ID 类型open_id
cancellationTokenCancellationToken取消操作令牌对象default

DeleteTimeoffEventAsync

删除一个指定的请假日程,用户签名页的请假信息也会消失。

函数签名

csharp
Task<FeishuNullDataApiResult?> DeleteTimeoffEventAsync(
    string timeoff_event_id,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
timeoff_event_idstring请假日程 IDtimeoff:XXXXXX-XXXX-0917-1623-aa493d591a39
cancellationTokenCancellationToken取消操作令牌对象default

GetMeetingRoomSummaryAsync

使用日程的 Uid 和 Original time 查询会议室日程主题与详情。

函数签名

csharp
Task<FeishuApiResult<GetMeetingRoomSummaryResult>?> GetMeetingRoomSummaryAsync(
    GetMeetingRoomSummaryRequest getMeetingRoomSummaryRequest,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
getMeetingRoomSummaryRequestGetMeetingRoomSummaryRequest查询会议室日程请求体-
cancellationTokenCancellationToken取消操作令牌对象default

ReplyMeetingRoomEventInstanceAsync

回复会议室日程实例,支持回复未签到释放、提前结束释放、被管理员置为接受/拒绝。

函数签名

csharp
Task<FeishuNullDataApiResult?> ReplyMeetingRoomEventInstanceAsync(
    ReplyMeetingRoomEventInstanceRequest replyMeetingRoomInstanceRequest,
    CancellationToken cancellationToken = default);

认证 租户令牌

参数

参数名类型必填描述示例
replyMeetingRoomInstanceRequestReplyMeetingRoomEventInstanceRequest回复会议室日程实例请求体-
cancellationTokenCancellationToken取消操作令牌对象default