> ## Documentation Index
> Fetch the complete documentation index at: https://strattumai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search entities

> Search entities by email, name, phone, external_id or free-text query. At least one field must be provided. Returns up to `limit` results sorted by last updated.



## OpenAPI

````yaml /api-reference/memory-api.json post /v1/memory/search
openapi: 3.1.0
info:
  title: Strattum Memory API
  description: >-
    REST API that serves entity context — profile, timeline, graph, sources and
    formatted context — for agents and UIs. (PRD-003, Workstream 1.3)
  version: 1.0.0
servers: []
security: []
paths:
  /v1/memory/search:
    post:
      tags:
        - memory
      summary: Search entities
      description: >-
        Search entities by email, name, phone, external_id or free-text query.
        At least one field must be provided. Returns up to `limit` results
        sorted by last updated.
      operationId: search_entities_v1_memory_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SearchRequest:
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          default: 20
      type: object
      title: SearchRequest
      description: Request body for POST /search.
    SearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/SearchHit'
          type: array
          title: Results
        count:
          type: integer
          title: Count
      type: object
      required:
        - results
        - count
      title: SearchResponse
      description: Response for POST /search.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchHit:
      properties:
        entity_id:
          type: string
          title: Entity Id
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        entity_type:
          type: string
          title: Entity Type
        golden_record:
          additionalProperties: true
          type: object
          title: Golden Record
        source_map:
          additionalProperties:
            type: string
          type: object
          title: Source Map
        confidence_score:
          type: number
          title: Confidence Score
        version:
          type: integer
          title: Version
        tags:
          items:
            type: string
          type: array
          title: Tags
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        match_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Match Tier
          description: >-
            Which search tier produced this hit: ``deterministic`` (unaccent +
            ILIKE), ``trigram`` (pg_trgm similarity) or ``vector`` (Qdrant
            cosine). Null when the search bypassed the orchestrator (legacy
            callers).
        match_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Match Score
          description: >-
            Normalised score used to rank this hit relative to other tiers.
            Higher = better. Tier-internal semantics: 1.0 for deterministic, raw
            pg_trgm similarity for trigram, cosine (scaled by tier base) for
            vector.
      type: object
      required:
        - entity_id
        - external_id
        - entity_type
        - golden_record
        - source_map
        - confidence_score
        - version
        - tags
        - created_at
        - updated_at
      title: SearchHit
      description: An entity match plus orchestration provenance (ADR-013).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````