Documentation menu
These are pre-release docs from the main branch.

API reference

4 operations in search. Raw spec: openapi.json.

GET/api/v1/search

GET /api/search — unified staff search across tickets, comments and the client hierarchy.

Parameters

NameInTypeRequiredDescription
qquerystringYesFree-text query using websearch syntax: `"exact phrases"`, `-excluded`, plain terms AND-ed. Tokens ≥3 chars also match as substrings via the trigram fallback.
client_idquery—NoOptional 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.
limitqueryintegerNo
offsetqueryintegerNo
cursorquery—NoOpaque 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

StatusDescription
200

Security: bearer

GET/api/v1/search/pins

GET /api/search/pins — the caller's own pins, newest-first.

Responses

StatusDescription
200

Security: bearer

POST/api/v1/search/pins

POST /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

StatusDescription
200
403no permission for that kind
404that row is not in your org's search index
422validation 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

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404pin not visible to this user

Security: bearer