Skip to content

发送草稿

将指定的草稿发送出去

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send
HTTP MethodPOST
接口频率限制20 次/分钟
支持的应用类型custom
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用mail:user_mailbox.message:send 发送用户邮件

请求头

名称类型必填描述
Authorizationstringuser_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token

路径参数

名称类型描述
user_mailbox_idstring用户邮箱地址。当使用用户身份访问时,可以输入"me"代表当前调用接口用户
示例值:"aba@aac.com"
draft_idstring草稿ID,可通过创建草稿、更新草稿或列出草稿列表接口获得
示例值:"268dce11-85f7-427d-8756-6be3abc850fd"

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ message_idstring发送后生成的已发送邮件ID
  └ thread_idstring邮件所属会话ID

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "message_id": "xxxx",
        "thread_id": "xxxx"
    }
}

错误码

HTTP状态码错误码描述排查建议
4001234008request parameter error参数错误,请检查请求参数的类型、格式或值是否与接口要求一致,具体可参考接口文档中的参数说明
4001236003the number of recipients exceeds the limit收件人数量超过限制,请减少收件人后重试
4001236004the number of attachments exceeds the limit附件数量超过限制,请减少附件数量后重试
4001236014content risk草稿存在风险内容,请检查草稿中的内容是否包含违规信息(如敏感词、违法内容等),修改后重新提交
4001236017sender check fail邮件发件人检查失败,请检查发件人信息和状态
4001236018receiver check fail邮件收件人检查失败,请检查收件人信息
4031234017permission deny无权限访问,请确认应用是否具备访问该资源的权限。如使用用户身份访问,请确认具备此用户的访问权限;如使用租户身份访问,请确认已申请对应的数据范围权限。
4041234050draft not found指定草稿不存在,请核对草稿ID,或重新创建草稿
4041234013user mailbox not found or user mailbox not active用户邮箱地址不存在,请检查输入的用户邮箱地址是否正确,或确认用户的邮箱处于正常状态
4091236005send mail repeatedly邮件已发送成功,请勿重复发送邮件
4291236006Concurrent write conflict. Please retry later同用户请勿并发请求
4291236007the daily number of emails sent by the user exceeds the limit触达用户每日发信数量上限,请联系管理员提升限额后重试
4291236008the number of external recipients the user sends messages to each day exceeds the limit用户每天发送邮件的外部收件人数量超过限制,请联系管理员提升限额后重试
4291236009the number of external recipients the tenant sends messages to each day exceeds the limit企业每天发送邮件的外部收件人数量超过限制,请联系管理员提升限额后重试
4291236010mail quota limit用户的发信请求被系统限流,请重试
4291236013tenant storage limit租户存储空间已满,无法发送更多邮件,联系管理员提升空间后重试
5001236019internal server error内部服务错误,请重试

内容来源:飞书开放平台 · 自动爬取整理