Skip to main content
POST
Create and dispatch a batch

Authorizations

Authorization
string
header
required

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

Headers

X-Organization-Id
string | null

Path Parameters

owner
string
required
slug
string
required

Body

application/json

POST body for creating a batch.

input is an array of per-item objects. Each item is validated independently against the target model's ModelInput declarations. Each item may carry an optional client_ref (≤255 chars, stripped before model validation); the model's own input shape fills the rest.

input
Input · object[]
required
Required array length: 1 - 100 elements
metadata
Metadata · object | null
callback_url
string | null
Maximum string length: 2048

Response

Successful Response

POST /batches response — batch fields + items handle list.

Shape matches the customer contract (docs/api/contracts/ batch-endpoint-api-surface.md "Response shape" section). Distinct from Batch.FullValidator which exposes additional internal fields for admin callers.

id
string<uuid>
required
target_type
string
required
target_id
string<uuid>
required
status_code
string
required
items_total
integer
required
items_succeeded
integer
required
items_failed
integer
required
items_cancelled
integer
required
items
BatchItemHandle · object[]
required
created_at
string<date-time>
required
output
Output · object | null
cost
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
metadata
Metadata · object | null
callback_url
string | null
started_at
string<date-time> | null
completed_at
string<date-time> | null