Skip to Content
MailroomMailroom home

Search conversations by words

Full-text search over subjects, senders and message text, best matches first. Agent keys see only their agent's inboxes. Needs inboxes:read.

GET
/search

Full-text search over subjects, senders and message text, best matches first. Agent keys see only their agent's inboxes. Needs inboxes:read.

Authorization

bearerAuth
headerAuthorizationBearer <mr_live_ / mr_test_>

API key. Never log the secret.

Query Parameters

q*string

Words; "quoted phrase"; -word to exclude; or

Lengthlength <= 200
from?string
Formatemail
status?string

Thread states

direction?string
Value in"inbound""outbound"
inbox_id?string
limit?integer
Range1 <= value <= 50
Default20
offset?integer
Range0 <= value <= 500
Default0

Response Body

Matches with a snippet (matches wrapped in **), and next_offset when there are more

application/json
  1. response
data?array<>
next_offset?integer|null
Example Request
curl -X GET 'https://api.mailroomapi.com/v1/search?q=string'
Example Response
{  "data": [    {      "message_id": "string",      "thread_id": "string",      "inbox_id": "string",      "inbox": "string",      "direction": "string",      "from": "string",      "subject": "string",      "thread_status": "string",      "snippet": "string",      "content_is_untrusted": true,      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_offset": 0}