API Reference
Search
Global full-text search across all CRM objects with optional filtering.
The Search endpoint performs a cross-object text search across your CRM data. It searches TEXT, EMAIL, URL, PHONE, and TEXTAREA fields on every object the authenticated user has access to.
Global search
GET /api/v1/searchQuery parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | -- | Required. The search term. Minimum 1 character. |
limit | number | 5 | Maximum results per object. Range: 1--50. |
offset | number | 0 | Number of results to skip per object (for pagination). |
object | string | -- | Restrict search to a single object (e.g., contacts). |
Behavior
- The search is case-insensitive and uses
ILIKEmatching. - Only fields marked as
isSearchablein the schema are included. By default, this covers TEXT, EMAIL, URL, PHONE, and TEXTAREA fields. - RBAC rules are applied: the user only sees results from objects they have permission to read.
- Results are grouped by object. Each group contains up to
limitmatching records. - When
objectis specified, only that object is searched. Otherwise, all accessible objects are searched in parallel.
Response
{
"query": "alice",
"results": [
{
"objectName": "contacts",
"objectLabel": "Contacts",
"records": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Alice",
"last_name": "Martin",
"email": "alice@example.com"
},
{
"id": "660f9511-f3ac-52e5-b827-557766551111",
"first_name": "Alice",
"last_name": "Dupont",
"email": "alice.dupont@company.com"
}
]
},
{
"objectName": "companies",
"objectLabel": "Companies",
"records": [
{
"id": "770a0622-a4bd-63f6-c938-668877662222",
"name": "Alice Technologies"
}
]
}
],
"total": 3
}Response fields
| Field | Type | Description |
|---|---|---|
query | string | The search term that was used |
results | array | Array of result groups, one per matching object |
results[].objectName | string | Internal object name |
results[].objectLabel | string | Display label for the object |
results[].records | array | Matching records with their searchable fields |
total | number | Total number of matching records across all objects |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or empty query parameter |
| 400 | INVALID_OBJECT | The object filter references a non-existent object |
Examples
Search across all objects:
curl -X GET "https://kasar.app/api/v1/search?query=alice" \
-H "Authorization: Bearer YOUR_API_TOKEN"Search within a specific object with pagination:
curl -X GET "https://kasar.app/api/v1/search?query=martin&object=contacts&limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN"Search with a higher result limit:
curl -X GET "https://kasar.app/api/v1/search?query=tech&limit=20" \
-H "Authorization: Bearer YOUR_API_TOKEN"