Search contracts (by title or recipient name/email) and templates (by name).
Query: q (trimmed; under 2 characters returns no rows) and limit (default 8, 1 to 20, the cap for the whole response). Rows are {type, type_label, id, title, subtitle, path}, best match first, spread across both types. Response: ``{data: [...], meta: {query, count}}``.
URL
- User APIhttps://contracts.mattering.io/api/user/v1/search/
- Service tierhttps://contracts.mattering.io/api/internal/search/
Query parameters
| Name | Default |
|---|---|
limit | none |
q | none |
Responses
200 bare JSON object (no envelope)
{
"data": [
"..."
],
"meta": {
"query": "...",
"count": 0
}
}
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 401 | unauthorized |
| 403 | org_required |
Example
curl -X GET "https://contracts.mattering.io/api/user/v1/search/?limit=...&q=..." \ -H "Authorization: Bearer $MATTERING_API_KEY"
curl -X GET "https://contracts.mattering.io/api/internal/search/?limit=...&q=..." \ -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \ -H "X-Internal-Org-Id: $ORG_ID" \ -H "X-Internal-User-Email: you@example.com"
Source: ContractsCore/search_api.py (search_api.search)