Batches
Cancel a batch
Request cancellation of a batch. The batch stops scheduling new requests and drains in-flight work before settling to cancelled. Cancelling a batch that is already cancelling or cancelled is idempotent and returns the batch unchanged. A batch that has already reached a terminal status (completed or expired) cannot be cancelled and the request fails with a 409.
post/batches/{id}/cancel
Path parameters
idstring required
Batch ID.
Example:batch_01j7x9v0m2n4p6q8r0s2t4v6w8
Batch ID.
Headers
Exa-Beta'batches-2026-06-06' required
Required beta token for the Batch API.
Required beta token for the Batch API.
Response
OK
Example response
{
"id": "batch_01j7x9v0m2n4p6q8r0s2t4v6w8",
"metadata": {
"slack_channel_id": "C123ABC",
"slack_thread_id": "1745444400.123456",
"user_id": "U123ABC"
}
}