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
| Name | Value | Description |
|---|---|---|
Content-Type | application/json | Request payload format. |
Authorization | Bearer <VERIFIK_JWT> | Client-scoped JWT (authUser.clientId). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
batchConfiguration | string | Yes | BatchConfiguration ObjectId defining the workflow steps. |
name | string | Yes | Batch display name. Maximum 150 characters. |
executor | string | No | Execution mode: "queue", "featureRunner", or "browser". When derived from batchConfiguration, it is normalized to "queue" or "browser". |
source | string | No | Originating product identifier: "smart_batch" (default) or "smart_fleet". |
rows | object[] | Yes | Array 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
- Node.js
- PHP
- Python
- Go
- cURL
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();
<?php
$payload = [
"batchConfiguration" => "6801a2b3c4d5e6f7a8b9c0d4",
"name" => "Colombia Onboarding — November",
"source" => "smart_batch",
"rows" => [
[
"rowIndex" => 0,
"inputData" => [
"documentType" => "CC",
"documentNumber" => "1032386359",
],
],
[
"documentType" => "CC",
"documentNumber" => "1007463534",
],
],
];
$ch = curl_init("https://api.verifik.co/v2/smart-batches");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
url = "https://api.verifik.co/v2/smart-batches"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
payload = {
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"name": "Colombia Onboarding — November",
"source": "smart_batch",
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359",
},
},
{
"documentType": "CC",
"documentNumber": "1007463534",
},
],
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body, _ := json.Marshal(map[string]interface{}{
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"name": "Colombia Onboarding — November",
"source": "smart_batch",
"rows": []map[string]interface{}{
{
"rowIndex": 0,
"inputData": map[string]string{
"documentType": "CC",
"documentNumber": "1032386359",
},
},
{
"documentType": "CC",
"documentNumber": "1007463534",
},
},
})
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/smart-batches", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -X POST "https://api.verifik.co/v2/smart-batches" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"name": "Colombia Onboarding — November",
"source": "smart_batch",
"rows": [
{
"rowIndex": 0,
"inputData": {
"documentType": "CC",
"documentNumber": "1032386359"
}
},
{
"documentType": "CC",
"documentNumber": "1007463534"
}
]
}'
Response
- 200 OK
- 401
- 403
- 409
- 422
{
"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"
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "\"rows[0].status\" is not allowed",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
Notes
- Never pass
status,results, orerrorsinsiderowswhen creating a batch; newly created rows always start inpendingstatus. - If
executoris omitted, it is resolved frombatchConfiguration.executorand 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.