Skip to main content
POST
/
v2
/
batch
/
pause
API_KEY='live_...'
BATCH_ID='batch_123'
curl --request POST \
--url "https://api.scale.com/v2/batch/pause" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{"batch_id": "'$BATCH_ID'"}'
{
  "batch": {
    "id": "batch_abc123",
    "name": "My Scale Batch",
    "project": "project_abc123",
    "created_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "status": "staging",
    "callback": "https://example.com/callback",
    "metadata": {}
  },
  "message": "Batch pause initiated. Only unstarted tasks will be paused."
}
Every request sent to Scale’s API requires authentication. In short, your API Key is the Bearer token. See the Authentication section for more details.

Batch Status Requirement

You can only pause batches that are currently in_progress. Batches in other statuses (staging, completed, paused) cannot be paused.Once paused, the batch status will change to paused and all unstarted tasks will be paused.

Required request parameters

You are expected to provide one of the following in the request body:
  • Batch ID (batch_id)
  • Batch Name (batch_name)

Authorizations

Authorization
string
header
required

Your API Key is the Bearer token. See the Authentication section to learn how to access your key.

Body

application/json

Request object for batch operations (finalize, pause, resume, cancel)

batch_id
string

A unique identifier for the batch.

Example:

"batch_abc123"

batch_name
string

The name of the batch.

Example:

"My Scale Batch"

Response

Batch pause initiated successfully.

batch
object
message
string
Example:

"Batch pause initiated. Only unstarted tasks will be paused."

I