Reanudar un Smart Batch
Reanuda un SmartBatch pausado (y cualquier ejecución subyacente de FeatureRunner). El servidor verifica que tu cuenta de cliente aún tenga permisos de funcionalidades para todos los pasos configurados (409 endpoints_not_in_account si se revocó el acceso a algún endpoint), comprueba que el lote esté en estado "paused" y lo pasa nuevamente a "processing".
Si el lote no está actualmente en "paused", la solicitud falla con 400 BadRequest (batch_not_paused, o run_not_paused cuando una ejecución subyacente de FeatureRunner no está pausada).
Endpoint
POST https://api.verifik.co/v2/smart-batches/{id}/resume
Este endpoint también es accesible a través del proxy de Smart-Agent en https://ai.verifik.co/v2/smart-batches/{id}/resume usando tu propio encabezado Authorization: Bearer <VERIFIK_JWT> por cliente. La ejecución compartida x402 está bloqueada con 403 Forbidden.
Encabezados
| Nombre | Valor | Descripción |
|---|---|---|
Content-Type | application/json | Formato de carga útil de la solicitud. |
Authorization | Bearer <VERIFIK_JWT> | JWT delimitado al cliente (authUser.clientId). |
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string | Sí | ObjectId de SmartBatch a reanudar. |
Solicitud
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";
const { data } = await axios.post(
`https://api.verifik.co/v2/smart-batches/${batchId}/resume`,
{},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);
console.log(data);
};
run();
<?php
$batchId = "6801a2b3c4d5e6f7a8b9c0d3";
$ch = curl_init("https://api.verifik.co/v2/smart-batches/" . $batchId . "/resume");
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, "{}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
batch_id = "6801a2b3c4d5e6f7a8b9c0d3"
url = f"https://api.verifik.co/v2/smart-batches/{batch_id}/resume"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
response = requests.post(url, json={}, headers=headers)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
batchID := "6801a2b3c4d5e6f7a8b9c0d3"
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/smart-batches/"+batchID+"/resume", bytes.NewReader([]byte("{}")))
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/6801a2b3c4d5e6f7a8b9c0d3/resume" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
Respuesta
- 200 OK
- 400
- 401
- 403
- 404
- 409 (Permisos faltantes)
- 409 (MissingParameter)
- 422
{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "processing",
"executor": "queue",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0.4,
"rows": [],
"totalRows": 25,
"completedRows": 10,
"failedRows": 0,
"partialRows": 0,
"startedAt": "2026-11-24T20:10:00.000Z",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:16:00.000Z"
}
}
{
"message": "batch_not_paused",
"code": "BadRequest"
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "batch_not_found",
"code": "NotFound"
}
{
"message": "endpoints_not_in_account co-cedula",
"code": "Conflict"
}
{
"message": "\"id\" is required",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
Notas
- Reanudar vuelve a validar los permisos de funcionalidades del cliente y rechaza la solicitud con
409 endpoints_not_in_accountsi algún endpoint de paso ya no está habilitado en tu cuenta. - Las filas completadas conservan sus resultados almacenados y no se vuelven a ejecutar ni se cobran dos veces al reanudar.
- Si el lote estaba en estado
"draft","pending"o"cancelled", usa Iniciar un Smart Batch en su lugar.