API REFERENCE

Search API

GET /api/v1/search performs a full-text query across all indexed business records — tickets, clients, contacts, projects, assets, invoices, documents, knowledge-base articles, and more — in a single request. Results are tenant-scoped and filtered by the caller's permissions. No dedicated search permission is required; any valid API key may call this endpoint.

Request

Pass a required query plus optional types, limit (1–100, default 30), cursor, and sort (relevance or recent). The full parameter reference — bounds, defaults, and validation — lives on the endpoint reference. The sections below cover what that page can't: how results are filtered, the response shape, and the types you can search.

Access control

Results are filtered at two layers before being returned:

  1. Per-type permission gate — types the caller's role cannot read are silently excluded. For example, an API key without invoice:read receives no invoice, invoice item, or invoice annotation results, even if those types are explicitly listed in types.
  2. Per-row ACL check — each candidate result is verified against the per-row access-control record in the search index. Only records the user could see in-app are returned. Client-portal API keys are automatically scoped to their own client.

Response shape

GET /api/v1/search?query=network&types=ticket,asset
{
  "data": {
    "results": [
      {
        "type": "ticket",
        "id": "9a4b...",
        "title": "Network outage at main office",
        "subtitle": "Acme Corp · Open",
        "snippet": "...the <mark>router</mark> stopped responding...",
        "url": "/tickets/9a4b...",
        "score": 0.91,
        "updatedAt": "2026-05-28T10:15:00Z"
      }
    ],
    "groups": { "ticket": 4, "asset": 2 },
    "totalCount": 6,
    "nextCursor": "eyJ..."
  }
}
resultsarray
Matched records for this page, ordered by sort.
results[].typestring
The object type — e.g. ticket, client, asset.
results[].idstring
The record's primary identifier within its type.
results[].parentIdstring?
Parent record identifier for nested types — e.g. the ticket ID for a ticket_comment.
results[].titlestring
Primary display label for the record.
results[].subtitlestring?
Secondary context line — e.g. client name and status.
results[].snippetstring?
Matched-text excerpt with <mark> tags around highlighted terms.
results[].urlstring
Relative in-app URL pointing at the record.
results[].scorenumber
Full-text relevance score; higher is more relevant.
results[].updatedAtISO 8601
Source record last-updated timestamp.
groupsobject
Per-type total match counts across all pages — useful for building a type-filter UI. Keys are object type names; values are integers.
totalCountinteger
Sum of all group counts across all permitted types.
nextCursorstring?
Cursor for the next page. Absent when all results fit within the current page.

Pagination

Pass the previous response's nextCursor as cursor on the next call, keeping query, types, and sort unchanged. groups and totalCount always reflect the full result set across all pages.

curl
# First page
curl "https://algapsa.com/api/v1/search?query=router&limit=10" \
  -H "X-API-Key: $ALGA_API_KEY"

# Next page — pass nextCursor from the previous response
curl "https://algapsa.com/api/v1/search?query=router&limit=10&cursor=$NEXT_CURSOR" \
  -H "X-API-Key: $ALGA_API_KEY"

Rate limiting

Governed by the standard API rate limit — 120-request burst, 60 per minute sustained. See Rate limits.

Supported types

Pass any comma-separated subset of the following values in the types parameter. Types the caller cannot read are silently excluded even if listed explicitly.

clientcontactuserticketticket_commentprojectproject_phaseproject_taskproject_task_commentassetinvoiceinvoice_iteminvoice_annotationcontractclient_contractdocumentkb_articleservice_catalogservice_request_submissionservice_request_definitionworkflow_taskinteractionschedule_entrytime_entryboardcategorytagstatus

Endpoints

Every endpoint links through to its full parameters, request and response schemas, and code samples.

GET/api/v1/searchAlgaPSAUnified full-text search