---
title: "Enrich Client Enhanced"
method: POST
path: "/api/enrich-client-enhanced"
tags: ["Client Enrichment"]
---

# Enrich Client Enhanced

`POST /api/enrich-client-enhanced`

Enhanced client enrichment endpoint with unified flow.

This endpoint:
1. Fetches org context (org_prompt, org_defaults) for the agent
2. Runs the Client Enrichment Agent which:
   - Enriches ALL contacts using Google context + LinkedIn
   - Determines if client is individual or business
   - Enriches client data accordingly
3. Handles save behavior based on source:
   - 'clientform': Returns data only (no auto-save)
   - 'frontend'/'agent': Auto-saves to database

Modes:
- 'full': Overwrites all client fields with enriched data
- 'fill_empty': Only fills fields that are currently empty

## Query parameters

- `user_id` string
- `org_id` string

## Request body

- EnhancedEnrichmentRequest — Request model for enhanced client enrichment.
  - `client_id` string, required — Client ID to enrich (or 'new' for new clients)
  - `company_name` string, nullable — Client name (optional)
  - `email` string, nullable — Primary contact email (deprecated - use contacts array)
  - `contacts` ContactInput[], nullable — All contacts for this client with their full data
    - `id` string, nullable — Contact ID (if existing contact)
    - `name` string, nullable — Contact's full name
    - `email` string, nullable — Contact's email address
    - `phone` string, nullable — Contact's phone number
    - `job_title` string, nullable — Contact's job title/role
    - `company` string, nullable — Contact's company/organization
    - `location` string, nullable — Contact's city/state/country
    - `seniority` string, nullable — Seniority level (C-suite, VP, Director, Manager, IC)
    - `industry` string, nullable — Industry/vertical they work in
    - `headline` string, nullable — Professional headline or tagline
    - `invoice_role` string, nullable — Role for invoices: 'to', 'cc', or null
    - `proposal_role` string, nullable — Role for proposals: 'to', 'cc', or null
    - `links` ExistingLinkInput[], nullable — Contact's existing links
      - `link_type` string, required
      - `url` string, required
      - `display_name` string, nullable
    - `internal_notes_for_agent` string, nullable — Internal notes about this contact
  - `existing_links` ExistingLinkInput[], nullable — Client-level links already added
    - `link_type` string, required
    - `url` string, required
    - `display_name` string, nullable
  - `client_address` string, nullable — Client's current address
  - `client_notes` string, nullable — Client's internal notes
  - `mode` 'full' | 'fill_empty' — 'full' overwrites all fields, 'fill_empty' only fills empty fields
  - `source` 'frontend' | 'agent' | 'clientform' — 'clientform' = preview only (no auto-save), others = auto-save

## Response `200`

Successful Response

- EnhancedEnrichmentResponse — Response model for enhanced enrichment.
  - `client_updated` boolean, required
  - `client_data` object
  - `contacts_enriched` EnrichedContactResponse[] — All contacts with enriched data
    - `id` string, nullable
    - `name` string, required
    - `email` string, nullable
    - `phone` string, nullable
    - `job_title` string, nullable
    - `company` string, nullable
    - `location` string, nullable
    - `seniority` string, nullable
    - `industry` string, nullable
    - `headline` string, nullable
    - `internal_notes_for_agent` string, nullable
    - `source` string, required
    - `confidence` number, required
    - `links` EnrichedLinkResponse[]
      - `link_type` string, required
      - `url` string, required
      - `display_name` string, nullable
    - `was_enriched` boolean — True if this contact had data enriched
    - `enriched_fields` string[] — Fields that were enriched
  - `discovered_contacts` DiscoveredContactResponse[] — New contacts discovered from email domain search. For clientform: add these to the form. For frontend/agent: already saved to DB.
    - `name` string, nullable
    - `email` string, required
    - `phone` string, nullable
    - `job_title` string, nullable
    - `company` string, nullable
    - `location` string, nullable
    - `seniority` string, nullable
    - `industry` string, nullable
    - `headline` string, nullable
    - `links` EnrichedLinkResponse[]
      - `link_type` string, required
      - `url` string, required
      - `display_name` string, nullable
    - `source` string — How this contact was discovered
    - `confidence` number
  - `contacts_created` object[]
  - `contacts_data` EnrichedContactResponse[]
    - `id` string, nullable
    - `name` string, required
    - `email` string, nullable
    - `phone` string, nullable
    - `job_title` string, nullable
    - `company` string, nullable
    - `location` string, nullable
    - `seniority` string, nullable
    - `industry` string, nullable
    - `headline` string, nullable
    - `internal_notes_for_agent` string, nullable
    - `source` string, required
    - `confidence` number, required
    - `links` EnrichedLinkResponse[]
      - `link_type` string, required
      - `url` string, required
      - `display_name` string, nullable
    - `was_enriched` boolean — True if this contact had data enriched
    - `enriched_fields` string[] — Fields that were enriched
  - `entity_links` EnrichedLinkResponse[]
    - `link_type` string, required
    - `url` string, required
    - `display_name` string, nullable
  - `is_individual` boolean — True if this is an individual, not a business
  - `enrichment_summary` object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/every/apis/every-api.md) · [All operations](https://skmtc.net/every/apis/every-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/every/every-api/versions/f8600f7a4ae3/schema)
