Skip to main content
POST
Count and page a batch's items

Authorizations

Authorization
string
header
required

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

Body

application/json
batch_id
string
required

The batch to read, from the submit response.

status
enum<string>[]

Filter returned items to these statuses. Counts and total remain batch-wide.

Minimum array length: 1
Available options:
queued,
in_progress,
cancelled,
done,
failed
include_responses
boolean
default:false

Return the items array as well as the counts. Left off, the call reads counts only, which is what a poll should do.

limit
integer
default:100

Items per page. Applies only with include_responses.

Required range: 1 <= x <= 1000
cursor
string | null

The cursor the previous page returned.

Response

The batch's counts, and a page of items when asked for.

Every Batch API route answers with this envelope. A failure carries message instead of data.

status
string
Allowed value: "success"
data
object
request_id
string