Skip to main content
POST
Create a batch job

Authorizations

Authorization
string
header
required

Body

application/json

Batch job creation request.

Body of a POST /v6/batches request.

data_source
AUDIENCE_LIST · object
required

Data source for the batch job. Required. Specify one of: REPORT (a previously completed report), AUDIENCE_LIST (an audience list build), or FILE_ASSET (an uploaded file asset).

columns
(FULL_NAME_MATCH · object | PATTERN_NAME_MATCH · object)[]

Column validation rules applied before the job begins dispatching. Each entry declares a column name and optional constraints; rows that fail validation are counted in failed_rows.

Column validation rules applied before the job begins dispatching. Each entry declares a column name and optional constraints; rows that fail validation are counted in failed_rows.

default_event_name
string

Fallback event name used when a row does not supply its own event name. Applied when event_name is omitted and no event_name column is present in the row.

event_columns
string[]

Column names in the data source whose values are used as event column values when dispatching each row. For example, ["person_id"] will pass the row's person_id value as the identity key for event dispatch.

Column names in the data source whose values are used as event column values when dispatching each row. For example, ["person_id"] will pass the row's person_id value as the identity key for event dispatch.

event_data
object

Static key-value pairs merged into every dispatched event's data map. These are applied in addition to any per-row data derived from event_columns.

event_name
string

Event name to dispatch for each row in the data source. When set, all rows dispatch this event regardless of any event_name column in the data. Omit to use the default_event_name or the per-row value from event_columns.

name
string

Human-readable label for the batch job. Used for display and filtering. Omit to leave unnamed.

scopes
enum<string>[]

Access-control scopes that restrict which user roles can interact with this job. Accepted values: CLIENT_SUPERUSER, CLIENT_ADMIN.

Access-control scopes that restrict which user roles can interact with this job. Accepted values: CLIENT_SUPERUSER, CLIENT_ADMIN.

Available options:
CLIENT_ADMIN,
CLIENT_SUPERUSER
tags
string[]

Arbitrary string labels attached to the batch job for filtering and grouping. Tags are also surfaced in batch-job-created notifications.

Arbitrary string labels attached to the batch job for filtering and grouping. Tags are also surfaced in batch-job-created notifications.

Response

Batch job created. Returns the full job record with an initial status of PENDING.