Skip to content

Preflight Enrichment

POST
/enrichment/preflight

Check an enrichment request before running it. Free: nothing is written, queued or charged.

Errors for input a run could never use: an unknown mode (400 invalid_mode), zero or negative contact IDs (400 invalid_record_ids), a list that is not in this organization (404 list_not_found), an unknown target_field (400 unsupported_field), an unknown provider (400 unsupported_provider / unsupported_provider_for_field) and a missing AI config (404 ai_config_not_found).

Otherwise returns what the run would do: the unique contact IDs (repeats are counted once), contacts that are not on the list, the providers that would run, and plain warnings such as “Lusha is not connected: add your key” or “No providers chosen: using your saved pipeline”.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Check an enrichment request before running it. Free: nothing is written, queued or charged.

Takes the same inputs as the MCP g8_enrich_contacts tool so a preview can say up front whether the run would work.

object
ai_group_id
Any of:
string
contact_ids
required

Contact IDs to enrich (duplicates are counted once)

Array<integer>
email_verification

Add ZeroBounce email verification

boolean
list_id
required

List ID the contacts belong to

integer
mode

‘auto’ (AI when ai_group_id is set, else waterfall), ‘waterfall’ or ‘ai-research’

string
default: auto
providers
Any of:
Array<string>
target_field
Any of:
string

Responses

200

Successful Response

object
data
required

What a run with these inputs would do. Errors (unknown list, mode, field or provider, impossible contact IDs) come back as 400/404 instead.

object
contact_count
required

Number of unique contacts (the count credits are estimated on)

integer
contact_ids
required

Contact IDs that will be enriched: duplicates removed, order kept

Array<integer>
credits_per_record
Any of:
integer
duplicates_removed

How many repeated contact IDs were dropped

integer
list_id
required
integer
list_name
Any of:
string
max_total_credits
Any of:
integer
missing_credentials

Providers whose step would be skipped because the org has no key for them

Array<string>
mode
required

Resolved mode: ‘waterfall’ or ‘ai-research’

string
not_in_list

Contact IDs that are not on the list; the run skips them and does not charge for them

Array<integer>
pipeline_column_id
Any of:
string
priced_records
Any of:
integer
providers

Providers that would run, in order (empty = the saved pipeline)

Array<string>
providers_detail
Array<object>

Per-step credential breakdown so callers can see, before running, which steps use graph8 system keys (charge credits) vs the org’s own BYOK key, and whether the required credential is actually present.

object
credential_ready
required

True if the step can actually run: system steps are always ready; BYOK steps are ready only when the org has an active key for that provider.

boolean
credential_source
required

‘system’ = graph8-funded; ‘byok’ = org’s own key.

string
Allowed values: system byok
is_system_provider
required

True = uses graph8-managed system key (charges credits). False = uses org BYOK key.

boolean
provider
required
string
target_field
Any of:
string
uses_saved_pipeline

True when the list’s saved pipeline (or the graph8 default) would run

boolean
warnings

Plain-language advisories for the user

Array<string>
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string