curl --request POST \
--url https://api.extole.io/v6/batches \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"columns": [
{
"name": "name",
"prefix": "prefix",
"type": "FULL_NAME_MATCH",
"validation_policy": "OPTIONAL"
}
],
"data_source": {
"audience_list_id": "audience_list_id",
"type": "AUDIENCE_LIST"
},
"default_event_name": "default_event_name",
"event_columns": [
"event_column"
],
"event_data": {
"event_data_key": "event_data_key"
},
"event_name": "event_name",
"name": "name",
"scopes": [
"CLIENT_ADMIN"
],
"tags": [
"tag"
]
}
'import requests
url = "https://api.extole.io/v6/batches"
payload = {
"columns": [
{
"name": "name",
"prefix": "prefix",
"type": "FULL_NAME_MATCH",
"validation_policy": "OPTIONAL"
}
],
"data_source": {
"audience_list_id": "audience_list_id",
"type": "AUDIENCE_LIST"
},
"default_event_name": "default_event_name",
"event_columns": ["event_column"],
"event_data": { "event_data_key": "event_data_key" },
"event_name": "event_name",
"name": "name",
"scopes": ["CLIENT_ADMIN"],
"tags": ["tag"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
columns: [
{
name: 'name',
prefix: 'prefix',
type: 'FULL_NAME_MATCH',
validation_policy: 'OPTIONAL'
}
],
data_source: {audience_list_id: 'audience_list_id', type: 'AUDIENCE_LIST'},
default_event_name: 'default_event_name',
event_columns: ['event_column'],
event_data: {event_data_key: 'event_data_key'},
event_name: 'event_name',
name: 'name',
scopes: ['CLIENT_ADMIN'],
tags: ['tag']
})
};
fetch('https://api.extole.io/v6/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.extole.io/v6/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'columns' => [
[
'name' => 'name',
'prefix' => 'prefix',
'type' => 'FULL_NAME_MATCH',
'validation_policy' => 'OPTIONAL'
]
],
'data_source' => [
'audience_list_id' => 'audience_list_id',
'type' => 'AUDIENCE_LIST'
],
'default_event_name' => 'default_event_name',
'event_columns' => [
'event_column'
],
'event_data' => [
'event_data_key' => 'event_data_key'
],
'event_name' => 'event_name',
'name' => 'name',
'scopes' => [
'CLIENT_ADMIN'
],
'tags' => [
'tag'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.extole.io/v6/batches"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.extole.io/v6/batches")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v6/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}"
response = http.request(request)
puts response.read_bodyCreate a batch job
Creates a new asynchronous batch job that reads its data source row-by-row and dispatches a consumer event for each row. The data source can be a previously run report, an audience list, or an uploaded file asset (CSV, PSV, or JSON). The job begins processing immediately after creation; poll GET /v6/batches/{batchId} to monitor status. For small inline batches of events, use POST /v6/async-events in the event-api instead.
curl --request POST \
--url https://api.extole.io/v6/batches \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"columns": [
{
"name": "name",
"prefix": "prefix",
"type": "FULL_NAME_MATCH",
"validation_policy": "OPTIONAL"
}
],
"data_source": {
"audience_list_id": "audience_list_id",
"type": "AUDIENCE_LIST"
},
"default_event_name": "default_event_name",
"event_columns": [
"event_column"
],
"event_data": {
"event_data_key": "event_data_key"
},
"event_name": "event_name",
"name": "name",
"scopes": [
"CLIENT_ADMIN"
],
"tags": [
"tag"
]
}
'import requests
url = "https://api.extole.io/v6/batches"
payload = {
"columns": [
{
"name": "name",
"prefix": "prefix",
"type": "FULL_NAME_MATCH",
"validation_policy": "OPTIONAL"
}
],
"data_source": {
"audience_list_id": "audience_list_id",
"type": "AUDIENCE_LIST"
},
"default_event_name": "default_event_name",
"event_columns": ["event_column"],
"event_data": { "event_data_key": "event_data_key" },
"event_name": "event_name",
"name": "name",
"scopes": ["CLIENT_ADMIN"],
"tags": ["tag"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
columns: [
{
name: 'name',
prefix: 'prefix',
type: 'FULL_NAME_MATCH',
validation_policy: 'OPTIONAL'
}
],
data_source: {audience_list_id: 'audience_list_id', type: 'AUDIENCE_LIST'},
default_event_name: 'default_event_name',
event_columns: ['event_column'],
event_data: {event_data_key: 'event_data_key'},
event_name: 'event_name',
name: 'name',
scopes: ['CLIENT_ADMIN'],
tags: ['tag']
})
};
fetch('https://api.extole.io/v6/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.extole.io/v6/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'columns' => [
[
'name' => 'name',
'prefix' => 'prefix',
'type' => 'FULL_NAME_MATCH',
'validation_policy' => 'OPTIONAL'
]
],
'data_source' => [
'audience_list_id' => 'audience_list_id',
'type' => 'AUDIENCE_LIST'
],
'default_event_name' => 'default_event_name',
'event_columns' => [
'event_column'
],
'event_data' => [
'event_data_key' => 'event_data_key'
],
'event_name' => 'event_name',
'name' => 'name',
'scopes' => [
'CLIENT_ADMIN'
],
'tags' => [
'tag'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.extole.io/v6/batches"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.extole.io/v6/batches")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v6/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"columns\": [\n {\n \"name\": \"name\",\n \"prefix\": \"prefix\",\n \"type\": \"FULL_NAME_MATCH\",\n \"validation_policy\": \"OPTIONAL\"\n }\n ],\n \"data_source\": {\n \"audience_list_id\": \"audience_list_id\",\n \"type\": \"AUDIENCE_LIST\"\n },\n \"default_event_name\": \"default_event_name\",\n \"event_columns\": [\n \"event_column\"\n ],\n \"event_data\": {\n \"event_data_key\": \"event_data_key\"\n },\n \"event_name\": \"event_name\",\n \"name\": \"name\",\n \"scopes\": [\n \"CLIENT_ADMIN\"\n ],\n \"tags\": [\n \"tag\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
Batch job creation request.
Body of a POST /v6/batches request.
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).
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
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.
- Option 1
- Option 2
Show child attributes
Show child attributes
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.
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.
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.
Show child attributes
Show child attributes
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.
Human-readable label for the batch job. Used for display and filtering. Omit to leave unnamed.
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.
CLIENT_ADMIN, CLIENT_SUPERUSER 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.
