Search API
Global search across your firm's matters, clients, and documents. Results are always scoped to your firm — you cannot search across other firms' data.
GET/api/v1/search
Search across matters (title), clients (name, email, phone), and documents (name). Returns grouped results by entity type.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query — minimum 2 characters |
| types | string | No | Comma-separated entity types to search: matters, clients, documents (default: all) |
| limit | number | No | Max results per type (default: 5, max: 20) |
cURL Example
curl "https://api.calmintake.com/api/v1/search?q=johnson&types=matters,clients" \ -H "X-Api-Key: ch_live_sk_abc123xyz"
Response
{
"data": {
"matters": [
{
"id": "mat_01HXYZ",
"title": "Johnson v. Smith",
"status": "active",
"practice_area": "personal_injury",
"client_name": "Alice Johnson",
"created_at": "2025-01-10T00:00:00.000Z"
}
],
"clients": [
{
"id": "cli_01HABC",
"name": "Alice Johnson",
"email": "alice@example.com",
"phone": "+15551234567",
"matters_count": 1
}
],
"documents": [
{
"id": "doc_01HDEF",
"name": "Medical Records",
"status": "uploaded",
"matter_id": "mat_01HXYZ",
"matter_title": "Johnson v. Smith",
"uploaded_at": "2025-01-12T10:00:00.000Z"
}
]
},
"query": "johnson",
"total_results": 3
}Search Behavior
- • Matters are searched by title (case-insensitive partial match)
- • Clients are searched by name, email address, and phone number
- • Documents are searched by document name within your firm's matters
- • Archived matters and inactive clients are included in results
- • Results are returned in relevance order (most recently updated first within each type)