Skip to main content
GET
Search cases and files
Perform a comprehensive search across all cases and files accessible to you. This endpoint allows you to find matching case labels and file names, providing a unified search experience for your document workflows.

Permission

You see the files you uploaded and their cases, or every file in your organisation if you have organisation_files:read or your organisation has shared cases enabled. An API key without organisation_files:read receives empty results, unless your organisation has shared cases enabled. See Permissions and API Keys. Pass scope=own to search only your own cases and files, or scope=org to search the whole organisation. If you cannot see every file, scope=org returns 400 with request.cases.case-file.org-scope-not-permitted.

Features

  • Prefix Matching: Search results include partial matches (e.g., “pol” matches “policy”).
  • Unified Results: Matches against both case labels and file names.
  • Flat Output: Returns a flat list of files with their parent case context for easy display.

Best Practices

  1. Debounce UI Searches: If implementing search-as-you-type in your frontend, debounce requests (e.g., 300ms) to avoid hitting rate limits.
  2. Specific Queries: More specific search terms yield more relevant results and improve performance.
  3. Pagination: Use limit and offset for large result sets to maintain responsive UI performance.

Authorizations

x-api-key
string
header
required

Query Parameters

query
string
required
Required string length: 1 - 100
limit
integer
default:50

Maximum number of results to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of results to skip for pagination

Required range: 0 <= x <= 9007199254740991
scope
enum<string>

Explicitly request a visibility scope. "own" forces the result to only cases/files the caller created, even if they can view the whole organisation. "org" explicitly requests every case/file in the organisation — rejected with 400 if the caller cannot view org-wide. Omitted (default): today's behaviour is unchanged — the caller's resolved org-wide visibility decides the result set, with no rejection.

Available options:
own,
org

Response

Search results retrieved successfully

results
object[]
required
total
number
required