Emails
Full-text search
GET
/emails/searchUse this when looking for a keyword. Unlike ?search= on the list, a term shorter than 2 characters is rejected rather than ignored.
Authorization
apiKey AuthorizationBearer <token>
Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.
In: header
Query Parameters
q*string
Length
2 <= length <= 200mailboxId?string
folderType?string
Restrict to one folder. Omitted, all folders are considered.
Value in
- "INBOX"
- "SENT"
- "DRAFTS"
- "SPAM"
- "TRASH"
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.
Range
1 <= value <= 200Default
50Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/emails/search?q=string" \ -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"}