Search emails by keyword
Full text style search on the subject, the sender name and address, the preview snippet and the recipient addresses. The full body is not searched. Matching is a case insensitive substring match.
Ranking: subject match first (with a bonus when the subject starts with the term), then sender (bonus on an exact sender match), snippet, recipients; ties are broken by date then id, most recent first.
Without folderType, every folder is searched. The inbox filters do not apply here: hidden emails can be returned.
The cursor of this endpoint has its own format (it starts with s|); pass it back unchanged. An unreadable cursor is ignored and the first page is returned again. Stop on hasMore: false.
Authorization
apiKey Your 48 character Emelia API key, the same as for the Emelia API, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api. Disabling a key can take up to 5 minutes to apply to the Inbox API.
In: header
Query Parameters
Search term, 2 to 200 characters after trimming. Too short or missing: 400 with details.q. Too long: 400 with details.search.
2 <= length <= 200Restrict to one mailbox (ids from GET /mailboxes). An unknown id returns an empty page.
Restrict to one system folder. Case sensitive; any other value is rejected with 400. Omitted, every folder is considered.
Value in
- "INBOX"
- "SENT"
- "DRAFTS"
- "SPAM"
- "TRASH"
Opaque nextCursor from the previous page. Its format is not part of the contract.
Page size. Above 200 it is clamped to 200; an unreadable or non positive value falls back to 50 (no error).
1 <= value <= 20050Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/emails/search?q=partnership&mailboxId=cmbxacme0000000000000001" \ -H "Authorization: YOUR_API_KEY"{ "items": [ { "id": "cmemacme0000000000000001", "mailboxId": "cmbxacme0000000000000001", "folderId": "cmfdacme0000000000000001", "messageId": "<CAJacme.0001@mail.example.com>", "threadId": "18c2acme0001", "subject": "Re: Partnership with Acme", "from": { "email": "jane.roe@example.com", "name": "Jane Roe" }, "to": [ { "email": "john.doe@acme.com", "name": null } ], "cc": [], "date": "2026-10-08T09:12:44.000Z", "snippet": "Thanks John, could we schedule a call next week?", "isRead": false, "isStarred": false, "isDraft": false, "waitingForReply": false, "hasAttachments": true, "attachments": [ { "filename": "brief.pdf", "size": 48213, "mimeType": "application/pdf" } ], "tags": [ { "id": "cmtgacme0000000000000002", "name": "Interested", "color": "#2563eb", "isAiLabel": true } ], "inReplyTo": "<20261008091500.acme01@acme.com>", "references": [ "<20261008091500.acme01@acme.com>" ] } ], "nextCursor": "s|65|2026-10-08T09:12:44.000Z|cmemacme0000000000000001", "hasMore": false}