Skip to main content
GET
列出邮件
按时间倒序列出单个收件箱内的邮件。返回 countlimitnext_page_tokenmessages,用 next_page_token 翻页。每封含 message_idthread_idlabelstimestampfromtoccbccsubjectpreview;正文全文来自 get_agentmail_inbox_message。要检索而非翻页用 get_agentmail_inbox_messages_search,要按会话归组用 get_agentmail_inbox_threads

示例

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

Authorization
string
必填

Bearer 身份验证

路径参数

inbox_id
string
必填

收件箱的 ID。

查询参数

limit
integer

返回项目数量的上限。

page_token
string

用于分页的页面 token。

labels
string[]

用于筛选的标签。

before
string<date-time>

用于筛选的截止时间戳。

after
string<date-time>

用于筛选此时间戳之后数据的时间戳。

ascending
boolean

按时间升序排序。

include_spam
boolean

在结果中包含垃圾邮件。

include_blocked
boolean

在结果中包含被屏蔽项。

include_unauthenticated
boolean

在结果中包含未经身份验证的内容。

include_trash
boolean

在结果中包含垃圾内容。

响应

状态码为 200 的响应

count
integer
必填

返回的项目数量。

messages
MessageItem · object[]
必填

timestamp 降序排列。

limit
integer

返回项目数量的上限。

next_page_token
string

用于分页的页面 token。