Skip to main content
POST
Create a batch (Phase 1)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
runCount
integer
required

Expected number of items in the batch. Must be a positive integer, up to the server's maximum batch size (1,000 by default; self-hosted instances can configure it). Requests above the maximum return a 400.

Required range: x >= 1
taskIdentifiers
string[]

Distinct task identifiers of the items in the batch. Used to authorize tokens scoped to specific tasks. If omitted, only credentials with broad task access are accepted.

Minimum array length: 1
parentRunId
string

Parent run ID (friendly ID) for batchTriggerAndWait.

resumeParentOnCompletion
boolean

Whether to resume parent on completion. Set to true for batchTriggerAndWait.

idempotencyKey
string

Idempotency key for the batch. If provided and a batch with this key already exists, the existing batch will be returned.

Response

Batch successfully created

id
string
required

The batch ID (friendly ID). Use this to stream items via POST /api/v3/batches/{batchId}/items.

runCount
integer
required

The expected run count.

isCached
boolean
required

Whether this response came from a cached/idempotent batch.

idempotencyKey
string

The idempotency key if provided.