Skip to main content
POST
/
v2
/
task
/
metadata
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": []
}
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.

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
task_id
string
required

Unique identifier for a task

Example:

"task_abc123"

metadata
object
required

Custom metadata for the entity.

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

Task metadata updated successfully.

task_id
string
required

Unique identifier for the task.

Example:

"task_abc123"

project
required

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

Example:

"project_abc123"

status
enum<string>
required

Current status of the task.

Available options:
pending,
completed,
canceled,
error
created_at
string<date-time>
required

UTC timestamp when the task was created.

batch

Batch ID or Batch associated with the task. A unique identifier for the batch.

Example:

"batch_abc123"

completed_at
string<date-time>

UTC timestamp when the task was completed.

metadata
object

Custom metadata for the entity.

threads
object[]

Threads associated with the task. Tasks that do not have a status of completed will have an empty threads array.

errors
object[]

Errors associated with the task. Available when the task status is error

sensitive_content_reports
object[]

Reports of sensitive content within the task. Available when the task status is completed. threads will not exist when the task is reported.

I