API reference
4 operations in search. Raw spec: openapi.json.
GET
/api/v1/searchGET /api/search — unified staff search across tickets, comments and the client hierarchy.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | Yes | Free-text query using websearch syntax: `"exact phrases"`, `-excluded`, plain terms AND-ed. Tokens ≥3 chars also match as substrings via the trigram fallback. |
client_id | query | — | No | Optional client scope for the `document` kind (0089, per-client document scoping): when set, indexed documents answer only when org-global (client_scope NULL) or scoped to THIS client. Every other kind is untouched. |
limit | query | integer | No | |
offset | query | integer | No | |
cursor | query | — | No | Opaque keyset cursor from the previous page's `next_cursor` (docs/perf.md F2). When present the walk resumes strictly after the anchor row and `offset` is ignored — the two mechanisms answer different callers, and the cursor is the one that stays at page-1 cost as depth grows. |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
GET
/api/v1/search/pinsGET /api/search/pins — the caller's own pins, newest-first.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/search/pinsPOST /api/search/pins — pins one stored result. The entity must EXIST in the index (a pin is a stored result, never invented) and kind sits behind the same permission gate the query ran behind. One pin per (kind, id): re-pinning is idempotent AND refreshes the stored snapshot (query + title + parent) to current — the created_at stays the original pin time (Wave 23 lane 1, item 6).
Request body
CreateSearchPinRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | no permission for that kind |
404 | that row is not in your org's search index |
422 | validation failed |
Security: bearer
DELETE
/api/v1/search/pins/{id}DELETE /api/search/pins/{id} — unpins the caller's OWN pin; another user's pin is simply not theirs (typed 404, never a conflict leak).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
404 | pin not visible to this user |
Security: bearer