Emails

List emails

GET/emails

Use this to browse a mailbox or a saved view. For keyword lookup use /emails/search instead.

Authorization

apiKey
AuthorizationBearer <token>

Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.

In: header

Query Parameters

mailboxId?string
folderType?string

Restrict to one folder. Omitted, all folders are considered.

Value in

  • "INBOX"
  • "SENT"
  • "DRAFTS"
  • "SPAM"
  • "TRASH"
viewId?string

Apply a saved view. Get ids from GET /views.

filtered?"only"

only lists the INBOX emails hidden by inbox filters and by hideFromInbox AI labels (the app's "Filtered emails"). The plain INBOX listing never returns them; views are never affected.

Value in

  • "only"
filters?string

JSON-encoded filter tree. Max 5 levels, 50 conditions, 500-character values.

search?string

Optional keyword filter. Terms shorter than 2 characters are ignored.

cursor?string

Opaque cursor from a previous response nextCursor. Format is ISO_DATE|ID and is not part of the contract.

limit?integer

Page size. Values above 200 are clamped.

Range1 <= value <= 200
Default50

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/emails" \  -H "Authorization: Bearer $MAYLEE_KEY"
{  "hasMore": true,  "items": [    {      "attachments": [        {          "filename": "brief.pdf",          "mimeType": "application/pdf",          "size": 48213        }      ],      "cc": [],      "date": "2026-08-25T13:47:02.000Z",      "folderId": "cmfd1a2b3c4d5e6f7g8h9i0j",      "from": {        "email": "client@acme.com",        "name": "Jane Client"      },      "hasAttachments": true,      "id": "cmemx1a2b3c4d5e6f7g8h9i0",      "inReplyTo": null,      "isDraft": false,      "isRead": false,      "isStarred": false,      "mailboxId": "cmbx1a2b3c4d5e6f7g8h9i0j",      "messageId": "<CAF3k9x1@mail.example.com>",      "references": [],      "snippet": "Hello, could you send us a quote for the annual plan?",      "subject": "Quote request",      "tags": [        {          "color": "Blue",          "id": "cmtgai1b2c3d4e5f6g7h8i9j",          "isAiLabel": true,          "name": "Sales"        }      ],      "threadId": "18c2f5a9e7b1d3c4",      "to": [        {          "email": "contact@your-company.com",          "name": null        }      ],      "waitingForReply": false    }  ],  "nextCursor": "2026-08-25T13:47:02.000Z|cmemx1a2b3c4d5e6f7g8h9i0"}