# Universal Search

Search across all entity types (contacts, customers, deals) in a single call. Supports fuzzy/typo-tolerant matching on names via pg_trgm.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /search

Universal fuzzy search across contacts, customers, and deals. Returns ranked results with entity_type, display_name, subtitle, and relevance rank. Exact substring matches rank highest (1.0), fuzzy matches rank by trigram similarity. Names support typo-tolerant matching; email and phone use exact substring matching.

**Scopes:** `contacts:read`, `companies:read`, `opportunities:read` — [full detail](./search/post-search.md)
