API_KEY='live_...'
TASK_ID='task_123'
curl --request POST \
--url "https://api.scale.com/v2/task/metadata" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"task_id": "'$TASK_ID'",
"metadata": {
"priority": "high",
"source": "api"
}
}'{
"task_id": "task_123",
"project": "project_123",
"batch": "batch_123",
"status": "pending",
"created_at": "2025-01-01T08:31:03.169Z",
"metadata": {
"priority": "high",
"source": "api",
"custom_field": "value"
},
"threads": []
}{
"status_code": 500,
"error": "An error has occurred."
}Set Task Metadata
Update the metadata for a Task.
API_KEY='live_...'
TASK_ID='task_123'
curl --request POST \
--url "https://api.scale.com/v2/task/metadata" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"task_id": "'$TASK_ID'",
"metadata": {
"priority": "high",
"source": "api"
}
}'{
"task_id": "task_123",
"project": "project_123",
"batch": "batch_123",
"status": "pending",
"created_at": "2025-01-01T08:31:03.169Z",
"metadata": {
"priority": "high",
"source": "api",
"custom_field": "value"
},
"threads": []
}{
"status_code": 500,
"error": "An error has occurred."
}Authentication
Authentication
Authorizations
Your API Key is the Bearer token. See the Authentication section to learn how to access your key.
Body
Unique identifier for a task
"task_abc123"
Custom metadata for the entity.
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
Task metadata updated successfully.
Unique identifier for the task.
"task_abc123"
Current status of the task.
pending, completed, canceled, error UTC timestamp when the task was created.
UTC timestamp when the task was completed.
Custom metadata for the entity.
Threads associated with the task. Tasks that do not have a status of completed will have an empty threads array.
Show child attributes
Show child attributes
Errors associated with the task. Available when the task status is error
Show child attributes
Show child attributes
Reports of sensitive content within the task. Available when the task status is completed. threads will not exist when the task is reported.
Show child attributes
Show child attributes

