# 搜索邮箱

根据关键字搜索邮箱

# 请求

基本
HTTP URL https://hi-gw.weizhipin.com/open-apis/mail/v1/mails/search
HTTP Method POST
支持的应用类型 自建应用
权限要求 [邮箱]-[查询邮箱通用信息]

# 请求头

名称 类型 必填 描述
Authorization string tenant_access_token
值格式:"Bearer access_token"
示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560"
Content-Type string 固定值:"application/json; charset=utf-8"

# 查询参数(url后?&拼接的参数)

名称 类型 描述
page_size int 分页大小,默认20
可填写1-100个/页
page_num int 分页页数
page_token string 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token
user_id_type string 用户 ID 类型示例值:"open_id"
可选值有:
open_id:用户的 open id
union_id:用户的 union id
user_id:用户的 user id
默认值:open_id

# 请求体

名称 类型 必填 描述
keywords string 示例值
hong
zenglinhong
zenglinhong@kanzhun
zenglinhong@kanzhun.com
mailbox_type int类型数组 邮箱类型
1、个人邮箱
2、邮件组
3、公共邮箱
不填写时视为查所有类型邮箱,支持多个枚举组合查询

# 请求体示例

{
  "keywords": "lim",
  "mailbox_type": [
    1,
    2
  ]
}
1
2
3
4
5
6
7

# 响应

# 响应体

名称 类型 描述
code int 错误码,非 0 表示失败
msg string 调用描述
trace_id string 链路id
data - -
  ∟ page_size int 分页大小
  ∟ has_more boolean 是否还有更多项
  ∟ page_token int 分页标记
  ∟ page_num int 分页页数
  ∟ total int 总记录数
  ∟ items list 分页数据
  ∟∟ mailbox_name string 邮箱名称
  ∟∟ mailbox_address string 邮箱地址
  ∟∟ mailbox_type int 邮箱类型
1、邮件组
2、公共邮箱
3、个人邮箱
  ∟∟ user_id string 个人邮箱时有值
  ∟∟ public_email_type int 0、项目
1、系统
(个人邮箱和邮件组该项无值)

page_size、page_num、page_token都传时,以前两项为准

# 响应体示例

{
  "code": "0",
  "traceId": "12313asd",
  "data": {
    "items": [
      {
        "mailbox_name": "邮箱名称",
        "mailbox_address": "cese01@kanzhun.com",
        "mailbox_type": 3,
        "user_id": "1123"
      },
      {
        "mailbox_name": "邮箱名称",
        "mailbox_address": "ces01@kanzhun.com",
        "mailbox_type": 2,
        "public_email_type": 1
      },
      {
        "mailbox_name": "邮箱名称",
        "mailbox_address": "c01@kanzhun.com",
        "mailbox_type": 1
      }
    ],
    "page_size": 5,
    "page_num": 1,
    "total": 100,
    "page_token": "wertsdfgxvb",
    "has_more": false
  },
  "msg": "操作成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

如果响应非成功状态,请对照 错误码文档

最后更新于 : 8/21/2023, 4:57:10 PM