Search
Full-text search across emails, contacts, campaigns, and templates
The /api/search route in MisarMail is an internal fumadocs docs-search endpoint — it searches documentation content, not your account data. User-facing search is implemented via the search query parameter available on the core list endpoints documented below.
Search via list endpoints
Every major resource in MisarMail supports a search query parameter that performs full-text search across the most relevant fields. Pass it to any list endpoint alongside your other filters.
Supported endpoints
| Endpoint | search searches | Auth |
|---|---|---|
GET /v1/contacts | email, first_name, last_name | API key |
GET /v1/campaigns | name, subject | API key |
GET /v1/templates | name | API key |
GET /v1/automations | name | API key |
GET /v1/segments | name | API key |
GET /api/inbox/conversations | lead_email, lead_name (via the q param) | Session |
Contacts search
GET /v1/contacts?search=jane&limit=20
Authorization: Bearer msk_...
Searches email, first_name, and last_name. Results are ranked by relevance.
{
"contacts": [
{ "id": "con_abc1", "email": "jane@example.com", "first_name": "Jane", "last_name": "Smith" },
{ "id": "con_abc2", "email": "janeb@corp.io", "first_name": "Jane", "last_name": "Brown" }
],
"pagination": { "page": 1, "limit": 20, "total": 2 }
}Campaigns search
GET /v1/campaigns?search=summer+sale&status=sent
Authorization: Bearer msk_...
Searches campaign name and subject. Combine with status to narrow results.
Templates search
GET /v1/templates?search=welcome
Authorization: Bearer msk_...
Searches template name.
Inbox search (session)
Unlike the API-key list endpoints, the inbox conversations endpoint uses a q parameter (not search):
GET /api/inbox/conversations?q=jane&status=active
Searches conversation lead_email and lead_name. Combine with status (active | closed | snoozed), intent, and channel filters. Requires session auth.
Matching behaviour
The inbox q parameter performs a case-insensitive substring match (SQL ILIKE) across lead_email and lead_name — not stemmed full-text search. Searching jane matches jane@example.com and Jane Doe.
Boolean operators (AND, OR, NOT) are not supported in the search or q parameters.
Example: combined search and filter
# Find sent campaigns mentioning "black friday"
curl "https://api.misar.io/mail/v1/campaigns?search=black+friday&status=sent&limit=10" \
-H "Authorization: Bearer msk_..."
# Find contacts matching "acme" with a tag filter
curl "https://api.misar.io/mail/v1/contacts?search=acme&tags=customer&limit=50" \
-H "Authorization: Bearer msk_..."// Contacts search
const res = await fetch(
'https://api.misar.io/mail/v1/contacts?search=jane&limit=20',
{ headers: { Authorization: `Bearer ${MSK}` } }
);
const { contacts } = await res.json();
// Campaign search
const campaigns = await fetch(
'https://api.misar.io/mail/v1/campaigns?search=summer+sale&status=sent',
{ headers: { Authorization: `Bearer ${MSK}` } }
).then(r => r.json());