Skip to content

Create Fields Batch

POST
/fields/batch

Create many custom columns (contacts or companies) in ONE request.

Backed by a single DB transaction with ONE view rebuild for the whole batch — the efficient path for setting up a list with dozens of columns at once. The single-column POST /fields is unchanged; this is purely additive.

Validation is fail-fast: data_types, duplicate titles, and every enrichment block are checked BEFORE any column is created, so a bad request creates nothing. Column creation itself is atomic (all columns or none).

Per-column enrichment blocks are applied AFTER the columns commit; if a companion enrichment config fails for one column, that column still exists and its results[] entry reports ok=false with the error — the rest of the batch is unaffected (mirrors the single endpoint’s column-then-config ordering, but per-field instead of failing the whole request).

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Create MANY custom columns in one request.

All columns are created in a single DB transaction with a SINGLE view rebuild — at 40-50 columns this replaces 40-50 view recreations with one.

object
entity

Target entity for ALL columns: ‘contacts’ or ‘companies’

string
default: contacts
fields
required

Columns to create (1-100).

Array<object>

One column in a batch-create request.

title, data_type and the optional enrichment block are per-column; list_id and entity are shared at the parent CreateFieldsBatchRequest level (a batch targets one entity and, when enrichment is used, one list).

object
data_type

Column data type. Currently only ‘text’ is supported.

string
default: text
enrichment
Any of:

Optional enrichment-pipeline block attached at column-create time.

When supplied, POST /fields creates a companion enrichment_configs row in the same request so the new column is immediately runnable via POST /enrichment/waterfall/enrich. Without this block the column exists but has no enrichment plan — calling /waterfall/enrich on it returns 422 (waterfall_config_missing).

Currently only type='waterfall' is supported; AI / formula enrichment will follow once the rest of the agent surface lands.

object
email_verification
Any of:

Email verification config attached to a waterfall pipeline.

Mirrors the canonical EmailVerificationConfigDto in enrichment/interfaces/fastapi/waterfall_dtos.py so the dev-API and the UI persist an identical settings shape (the CF worker reads settings. email_verification.* regardless of which surface saved the pipeline).

object
accept_catchall

Treat catch-all responses as valid (domains that accept any address).

boolean
enabled

Enable post-enrichment email verification

boolean
default: true
provider

Verification provider. Charges credits when use_system_credentials=True.

string
default: zerobounce
Allowed values: zerobounce hunter icypeas leadmagic
use_system_credentials

Use graph8-managed API keys (charges credits). False = use org’s BYOK keys.

boolean
default: true
valid_statuses

Verification statuses to accept as valid. Typical: [‘valid’] or [‘valid’,‘catch-all’].

Array<string>
field_to_enrich
Any of:
string
name
Any of:
string
providers
Any of:
Array<string>
skip_existing_values

If true, skip rows where the target field is already populated.

boolean
default: true
steps
Any of:
Array<object>

Single step in a caller-supplied waterfall sequence.

Mirrors WaterfallStepDto in enrichment/interfaces/fastapi/waterfall_dtos.py. Persisted verbatim into enrichment_configs.config.steps[] so the CF worker can resolve provider, action and credentials the same way UI-saved pipelines do.

object
action
required

Provider action: lookup_person, find_email, enrich_person, …

string
action_display_name
Any of:
string
confidence_threshold
number
<= 1
config

Provider-specific options (e.g. apollo reveal_phone_numbers=true).

object
key
additional properties
any
enabled
boolean
default: true
id
Any of:
string
input_mapping

Maps provider input names to graph8 column identifiers (CONTACT_*).

object
key
additional properties
string
is_system_provider

True = use graph8-managed credentials + charge credits. False = use org BYOK.

boolean
max_retries
integer
<= 3
order

0-indexed execution order.

integer
output_field
Any of:
string
output_mapping

Optional output field remap (deprecated — prefer output_field).

object
key
additional properties
string
provider
required

Provider name: graph8, hunter, prospeo, dropcontact, apollo, …

string
stop_on_success
boolean
default: true
target_field
Any of:
string
type

Pipeline kind. Only ‘waterfall’ is supported today.

string
default: waterfall
title
required

Column title, e.g. ‘Job Level’

string
list_id
Any of:
integer

Responses

201

Successful Response

object
data
required
object
entity
required
string
list_id
Any of:
integer
results
required
Array<object>

Per-column outcome inside a batch response.

object
enrichment
Any of:

Echo of the companion enrichment config created by enrichment block.

object
column_id
required

Column_id slug to pass to /enrichment/waterfall/enrich

string
config_id
required
string
email_verification
Any of:
object
key
additional properties
any
name
required
string
providers
Array<string>
type
required
string
error
Any of:
string
id
Any of:
integer
is_global

True when this column was created org-GLOBAL (no list_id was supplied) and will therefore appear on EVERY list in the org. Pass list_id to scope columns to one list.

boolean
list_id
Any of:
integer
name
Any of:
string
ok
boolean
default: true
title
required
string
total_created
required
integer
total_requested
required
integer
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

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