Skip to content

修改公共邮箱部分信息

更新公共邮箱部分字段,没有填写的字段不会被更新。

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/mail/v1/public_mailboxes/:public_mailbox_id
HTTP MethodPATCH
接口频率限制特殊频控
支持的应用类型custom
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用mail:public_mailbox 查询、创建、修改公共邮箱

请求头

名称类型必填描述
Authorizationstringtenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token
Content-Typestring固定值:"application/json; charset=utf-8"

路径参数

名称类型描述
public_mailbox_idstring公共邮箱唯一标识或公共邮箱地址
示例值:"xxxxxxxxxxxxxxx 或 test_public_mailbox@xxx.xx"

请求体

名称类型必填描述
emailstring公共邮箱地址
示例值:"test_public_mailbox@xxx.xx"
namestring公共邮箱名称
示例值:"test public mailbox"

请求体示例

json
{
   "name": "xxx",
   "email": "xxx@xxx.xxx"
}

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
datapublic_mailbox-
  └ public_mailbox_idstring公共邮箱唯一标识
  └ emailstring公共邮箱地址
  └ namestring公共邮箱名称

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "public_mailbox_id": "xxx",
        "email": "xx@xx.xx",
        "name":"xxx"
    }
}

错误码

HTTP状态码错误码描述排查建议
4041234016public mailbox not found请确认公共邮箱是否存在
4091234033email address has been used by another member as a login account邮件地址已被他人用作登录邮箱,请使用其它邮件地址
4001234008request parameter error请检查请求参数是否正确
4091234006email address has been used邮件地址已被占用,请使用其它邮件地址
4091234023email address alias exceeds the number limit超出了邮箱别名限制

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