Skip to main content

Create a Smart Batch

Create a SmartBatch linked to an existing BatchConfiguration. You supply a display name and at least one input row in rows. Creating the batch persists the input rows with status: "draft" and does not execute catalog steps or spend credits until execution starts.

Each entry in rows accepts either a wrapped object ({ rowIndex?, inputData }) or a flat object ({ rowIndex?, ...inputFields }), which the validation layer normalizes into { rowIndex, inputData }. Do not include status, results, or errors on create.

Endpoint​

POST https://api.verifik.co/v2/smart-batches

This endpoint is also reachable through the Smart-Agent proxy at https://ai.verifik.co/v2/smart-batches using your own per-client Authorization: Bearer <VERIFIK_JWT>. Shared x402 execution is blocked with 403 Forbidden.

Headers​

NameValueDescription
Content-Typeapplication/jsonRequest payload format.
AuthorizationBearer <VERIFIK_JWT>Client-scoped JWT (authUser.clientId).

Body​

NameTypeRequiredDescription
batchConfigurationstringYesBatchConfiguration ObjectId defining the workflow steps.
namestringYesBatch display name. Maximum 150 characters.
executorstringNoExecution mode: "queue", "featureRunner", or "browser". When derived from batchConfiguration, it is normalized to "queue" or "browser".
sourcestringNoOriginating product identifier: "smart_batch" (default) or "smart_fleet".
rowsobject[]YesArray of at least 1 row (min 1). Accepts wrapped { rowIndex?, inputData } or flat { rowIndex?, ...inputFields }. Do not send status, results, or errors on create.

Unknown keys and disallowed row properties (status, results, errors) are rejected by Joi validation with 409 MissingParameter.

Request​

import axios from "axios";

const run = async () => {
const { data } = await axios.post(
"https://api.verifik.co/v2/smart-batches",
{
batchConfiguration: "6801a2b3c4d5e6f7a8b9c0d4",
name: "Colombia Onboarding — November",
source: "smart_batch",
rows: [
{
rowIndex: 0,
inputData: {
documentType: "CC",
documentNumber: "1032386359",
},
},
{
documentType: "CC",
documentNumber: "1007463534",
},
],
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);

console.log(data);
};

run();

Response​

{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "draft",
"executor": "browser",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0,
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
},
"status": "pending",
"results": {},
"errors": [],
"creditsSpent": 0,
"attemptCount": 0,
"attempts": []
},
{
"rowIndex": 1,
"inputData": {
"documentType": "CC",
"documentNumber": "1007463534"
},
"status": "pending",
"results": {},
"errors": [],
"creditsSpent": 0,
"attemptCount": 0,
"attempts": []
}
],
"totalRows": 2,
"completedRows": 0,
"failedRows": 0,
"partialRows": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:00.000Z"
}
}

Notes​

  • Never pass status, results, or errors inside rows when creating a batch; newly created rows always start in pending status.
  • If executor is omitted, it is resolved from batchConfiguration.executor and normalized to "queue" or "browser".
  • After creation, call Estimate Smart Batch cost to preview credit charges and Start a Smart Batch to begin processing.
  • For bulk CSV, XLSX, or JSONL imports with dependency validation and optional immediate execution, use Create a Smart Batch from a file.