Developers
Developers/Batches
BUILD / API V1

Batches

Run one operation across as many as 100 targets.

One request, up to 100 targets

A batch creates an independently retried child job for every target while keeping one parent ID for status, cancellation and export.

cURL
curl -X POST "https://api.caelario.com/v1/batches" \
  -H "X-API-Key: $CAELARIO_API_KEY" \
  -H "Idempotency-Key: campaign-2026-08-23" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "operation": "posts",
    "targets": ["nike", "adidas", "puma"],
    "limit": 12
  }'
Response202 Acceptedcontent-type: application/json
JSON
{
  "id": "53337f72-...-dc2e",
  "platform": "instagram",
  "operation": "posts",
  "requested_limit": 12,
  "include_posts": 0,
  "target_count": 3,
  "status": "queued",
  "queued_count": 3,
  "running_count": 0,
  "completed_count": 0,
  "failed_count": 0,
  "cancelled_count": 0,
  "result_count": 0,
  "reserved_credits": 36,
  "billed_credits": 0,
  "cancel_requested_at": null,
  "created_at": "2026-08-23T12:05:00Z",
  "jobs": [
    { "id": "job_nike", "target": "nike", "status": "queued" },
    { "id": "job_adidas", "target": "adidas", "status": "queued" },
    { "id": "job_puma", "target": "puma", "status": "queued" }
  ],
  "idempotent_replay": false
}

All children share one recipe

platform, operation, limit, and optional include_posts apply to every target. Targets are ordered, trimmed, case-insensitively deduplicated and must be unique.

Maximum100 targets

Each target remains an independent job.

SettlementPer child

Failed children release their reservation.

Inspect child progress

Call GET /v1/batches/{batch_id} for aggregate counts and child job summaries. List calls omit child jobs by default; use ?include_jobs=true when you need them.

queued_countWaitingrunning_countIn progresscompleted_countDeliveredfailed_countReleased

Cancellation and combined export

Batch cancellation is idempotent. A combined export becomes available after at least one child result is ready and returns every completed child with its target context.