Skip to main content
POST
Cancel every run in a batch

Authorizations

Authorization
string
header
required

Send Authorization: Bearer tst_live_….

Format (services/api-keys.ts): the literal prefix tst_live_ followed by 24 random bytes rendered as 32 base64url characters. Only the SHA-256 hash is stored server-side. The shape check that routes a token down the API-key path rather than the Clerk JWT path requires the tst_live_ prefix and a total length of at least 25 characters.

Keys are minted in the dashboard at /settings/team. The same header also accepts a Clerk session JWT, which is how the web app authenticates, but the JWT path is out of scope for this document.

Path Parameters

batchId
string
required

The batch identifier. Read it from a run's batchId, or from an active-run group. Not validated as a UUID by the handler, though the column is uuid.

Response

Cancellation processed for the batch.

cancelled
integer
required

Number of DB rows flipped from pending/running to cancelled. Zero when the run(s) had already finished.

Required range: x >= 0
reapedHandlers
integer
required

Number of live orchestrators whose in-memory cancel handler actually fired and tore a browser down. Can be lower than cancelled when a process already exited.

Required range: x >= 0