# 获取邮件列表

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/message/list:
    post:
      summary: 获取邮件列表
      deprecated: false
      description: >-
        -
        本接口旗舰版请求请使用独立服务器地址，参考文档：https://docs.cuiqiu.com/docs/domain-email/%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97/%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3#api%E8%AF%B7%E6%B1%82%E5%9C%B0%E5%9D%80
      tags:
        - 邮件
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                token:
                  description: 后台生成的token
                  example: '{{token}}'
                  type: string
                folder:
                  type: string
                  description: >-
                    邮箱文件夹，可以通过/v1/message/folder/list接口获取。如：Inbox，备注：Inbox:收件箱
                    Drafts:草稿箱 Sent:发件箱 Deleted Items:已删除邮件
                  example: Inbox
                mail_id:
                  description: 邮箱ID(可在脆球后台获取，或者通过/v1/mail/list接口获取，id字段即为mail_id)
                  example: '12345678'
                  type: string
                start_time:
                  description: 开始时间，如：2015-05-20
                  example: '2024-05-01'
                  type: string
                end_time:
                  description: >-
                    结束时间，如：2015-05-20。特别注意：接口时间选择维度是天，如选择当天，请将日期加一处理，如：end_time设置2021-05-01，代表2021-05-01
                    00:00:00，如需请求2021-05-01的数据，请设置为2021-05-02
                  example: '2025-03-24'
                  type: string
                page:
                  description: 页码
                  example: 1
                  type: integer
                limit:
                  description: 每页返回条数，最大为20
                  example: 10
                  type: integer
                keyword:
                  description: >-
                    关键词搜索，从多个字段中筛选(邮件标题/收件人/发件人/邮件内容/附件)。如果设置了keyword，不要传递独立字段筛选参数
                  example: 关键词
                  type: string
                subject:
                  description: 关键词搜索，从标题中筛选
                  example: 标题
                  type: string
                body:
                  description: 关键词搜索，从邮件内容中筛选
                  example: 内容
                  type: string
                from:
                  description: 关键词搜索，从发送邮箱中筛选，如：from@mail.com
                  example: from@mail.com
                  type: string
                to:
                  description: 关键词搜索，从接收邮箱中筛选，适合代收功能使用，如：to@mail.com
                  example: to@mail.com
                  type: string
                flagged:
                  type: integer
                  description: 筛选星标邮件，1星标邮件 -1未星标邮件 0全部
                  example: 0
                seen:
                  type: integer
                  description: 筛选阅读邮件，1已读 -1未读 0全部
                  example: 0
              required:
                - token
                - folder
                - mail_id
                - start_time
                - end_time
                - page
                - limit
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      list:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            id:
                              type: string
                            subject:
                              type: string
                            time:
                              type: string
                            timestamp:
                              type: integer
                            to:
                              type: string
                          required:
                            - from
                            - id
                            - subject
                            - time
                            - timestamp
                            - to
                          x-apifox-orders:
                            - from
                            - id
                            - subject
                            - time
                            - timestamp
                            - to
                      total:
                        type: integer
                    required:
                      - list
                      - total
                    x-apifox-orders:
                      - list
                      - total
                required:
                  - code
                  - msg
                  - data
                x-apifox-orders:
                  - code
                  - msg
                  - data
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 邮件
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2485881/apis/api-70576021-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://domain-open-api.cuiqiu.com
    description: 正式环境
security: []

```
