# Fetch emails

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/onebox/top-emails:
    get:
      summary: Fetch emails
      deprecated: false
      description: Fetch paginated list of emails from a connected email account.
      tags:
        - zapbox
      parameters:
        - name: account
          in: query
          description: >-
            Connected email account (if not specified, emails of all connected
            accounts will be returned)
          required: false
          example: abc@example.com
          schema:
            type: string
        - name: folder
          in: query
          description: 'Filter by Folder/Label name '
          required: false
          example: Sent
          schema:
            type: string
        - name: page
          in: query
          description: Page number of the list of emails
          required: false
          example: 1
          schema:
            type: integer
        - name: limit
          in: query
          description: Number of emails to be returned per page.
          required: false
          example: 100
          schema:
            type: integer
        - name: includeWarmUp
          in: query
          description: >-
            Use true to include warm up emails (note - this only works for
            reachinbox warm up emails as of now)
          required: false
          example: 'true'
          schema:
            type: boolean
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-workspace-id
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-service-provider
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        account:
                          type: string
                        threadId:
                          type: string
                        messageId:
                          type: string
                        subject:
                          type: string
                        from:
                          type: array
                          items:
                            type: object
                            properties:
                              address:
                                type: string
                              name:
                                type: string
                            x-apidog-orders:
                              - address
                              - name
                        to:
                          type: array
                          items:
                            type: object
                            properties:
                              address:
                                type: string
                              name:
                                type: string
                            x-apidog-orders:
                              - address
                              - name
                        isRead:
                          type: boolean
                        isStarred:
                          type: boolean
                        isWarmUp:
                          type: boolean
                        labels:
                          type: array
                          items:
                            type: string
                        folderPath:
                          type: string
                        date:
                          type: string
                      x-apidog-orders:
                        - account
                        - threadId
                        - messageId
                        - subject
                        - from
                        - to
                        - isRead
                        - isStarred
                        - isWarmUp
                        - labels
                        - folderPath
                        - date
                required:
                  - success
                  - data
                x-apidog-orders:
                  - success
                  - data
              example:
                success: true
                data:
                  - account: abc@example.com
                    threadId: >-
                      AAGkADUzZWZjNTNjLTE5M2ItNDA2ZC1iY2E3LWU2ZWQ5MDdhYzVjMgEQAAQGAKackCpIlFXN9ZjQazA=
                    messageId: <0GGB07WVCSU2.MXZV8VTDVYK12@ds3pesf00012546>
                    subject: New recommendation available
                    from:
                      - address: MSSecurity-noreply@microsoft.com
                        name: Microsoft Security
                    to:
                      - address: abc@example.com
                        name: ABC Snyder
                    isRead: false
                    isStarred: false
                    isWarmUp: false
                    labels:
                      - inbox
                    folderPath: inbox
                    date: '2026-01-28T01:16:34Z'
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: zapbox
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-26786130-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
