What search reads
- The subject, the sender's name and address, and the text of each message, up to 8,000 characters.
- On a paid plan, the text of attached PDF, Word, Excel, CSV, HTML, JSON and text files too, up to 8,000 characters a message. Images aren't read.
- Every word of
qmust match, the first 10 of them. Words are matched as words: an address such asbilling@stripe.comis one. - A new message is found by its first characters the moment it arrives, and by its whole text and its files within minutes.
index.pendingcounts the agent's messages still being indexed.
Search with one call
GET /v1/search takes the words in q, and filters that narrow the match: one inbox, a sender, dates and files. It answers a page of messages as lists show them, newest first.
curl -G https://blueping.dev/v1/search \
-H "Authorization: Bearer $BLUEPING_API_KEY" \
--data-urlencode "q=invoice november" \
--data-urlencode "from=@stripe.com" \
-d has_attachment=true{
"data": [
{
"id": "em_9PzR4fYc1KwM6tDq3VxB",
"inbox_id": "inb_4Kd9Wq1Mz5TbX2Vn7RcP",
"from": { "address": "billing@stripe.com", "name": "Stripe" },
"subject": "Your November invoice",
"extracted_text": "Your invoice for November is ready.",
"attachments": [{ "id": "att_1", "filename": "invoice-november.pdf", "content_type": "application/pdf" }],
"created_at": "2026-11-20T09:12:01.000Z"
}
],
"order": "newest_first",
"next_cursor": null,
"held": { "count": 0, "reasons": { "suspicious": 0, "unauthenticated": 0 }, "show_with": "include=held" },
"index": { "pending": 0 }
}| Parameter | What it does |
|---|---|
q | The words to find. Required. |
inbox_id | Only this inbox. Every inbox of the agent when left out. |
from | Only mail from this address, or from this domain, written @stripe.com. |
after, before | Only mail stored on or after a date, or before one, such as 2026-11-01. |
has_attachment | true keeps mail with files, false mail without. |
order | newest, the default, or relevance. |
limit, cursor | 1 to 100 messages a page, 20 by default, and the previous answer's next_cursor for the next, older page. |
include | held adds held messages that match, for a key that holds held:read. |
Newest first, or best match
By default the newest matches come first, and next_cursor pages back through older ones until it is null. With order=relevance, the best matches come first, up to 100, on one page: the answer says relevance in order, and next_cursor is null.
Newest first suits an agent that wants the latest receipt or the last reply from someone. Best match suits a question in words, such as the email where a customer gave their order number.
Held mail in results
Held messages are left out of the results and counted in held, with their reasons, as on every list: an empty page never hides that something matched. A key that holds held:read adds them with include=held, and reads them as data.
From an agent over MCP
The tool search_messages takes the same filters: q, inbox_id, from, after, before, has_attachment, limit and cursor, and include_held for a connection that may read held mail. Its answer names each match, and says how to ask for older ones.
A request such as this one makes the agent search, then act on what it found:
Find the November invoice from Stripe in my agent's inbox and forward it to my accountant at books@ortiz.example.Keys and pace
Search takes a key that holds email:read. A key made for one inbox searches that inbox only, and inbox_id can't reach another. Keys and permissions.
Searches share their pace with the reads of events, per agent and all its keys together. Past it, 429 rate_limited comes with retry_after. Limits.