Skip to main content
POST
/
v2
/
batch
/
metadata
API_KEY='live_...'
BATCH_ID='batch_123'
curl --request POST \
--url "https://api.scale.com/v2/batch/metadata" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"batch_id": "'$BATCH_ID'",
"metadata": {
"priority": "high",
"dataset_version": "v1.2"
}
}'
{
  "id": "batch_123",
  "name": "Batch Name Example",
  "project": "project_123",
  "created_at": "2022-07-25T07:32:34.318Z",
  "status": "completed",
  "callback": "https://example.com/callback",
  "metadata": {},
  "completed_at": "2022-07-26T07:32:34.318Z"
}
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.

Required query parameters

You are expected to provide one of the following:
  • 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
metadata
object
required

Custom metadata for the entity.

batch_id
string

A unique identifier for the batch.

Example:

"batch_abc123"

batch_name
string

The name of the batch.

Example:

"My Scale Batch"

merge
boolean
default:false

Whether to deep merge the provided metadata with existing metadata. If false, replaces the entire metadata object. If true, performs a deep merge and replaces existing keys with new values.

Response

Batch metadata updated successfully.

id
string
required

A unique identifier for the batch.

Example:

"batch_abc123"

name
string
required

The name of the batch.

Example:

"My Scale Batch"

project
required

Project ID or Project associated with the batch. A unique identifier for the project.

Example:

"project_abc123"

created_at
string<date-time>
required

A timestamp formatted as an ISO 8601 date-time string.

status
enum<string>
required

Status of the batch.

Available options:
staging,
in_progress,
completed,
paused,
cancelled
metadata
object
required

Custom metadata for the entity.

completed_at
string<date-time>

UTC timestamp when the batch was completed.

callback
string

Callback URL or email for the entity upon completion.

Example:

"https://example.com/callback"

I