TrustPager Docs

← Help Center

Api

Searching service requests with semantic search

How to use the POST /v1/service-requests/search endpoint to find service requests by meaning, not just exact keywords.

TrustPager service requests support semantic search — search by what you mean, not just exact words. The search endpoint uses embeddings to match requests that are conceptually related to your query, even when the wording is different.

The endpoint

Send a POST request to /v1/service-requests/search with a JSON body containing your query.

POST /v1/service-requests/search
Content-Type: application/json
Authorization: Bearer <your-api-key>

{
  "q": "billing issue with invoice",
  "limit": 20,
  "threshold": 0.5
}

Parameters

Response shape

The endpoint returns an array of matching service requests, each with a similarity score indicating how closely it matched your query.

{
  "data": [
    {
      "id": "sr_abc123",
      "title": "Customer cannot pay invoice",
      "status": "open",
      "similarity": 0.87
    }
  ]
}

When to use it

Semantic search is useful when you want to find related requests without knowing the exact wording used. For example, searching for "payment failed" will surface requests titled "invoice not going through" or "card declined on checkout" — results a keyword search would miss.

If you need precise filtering by status, date, or assignee, use the standard GET /v1/service-requests list endpoint with query parameters instead.

← Back to Help Center Open on trustpager.com ↗