Skip to main content
POST
Add a label to assets

Authorizations

Authorization
string
header
required

A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.

Headers

Idempotency-Key
string

Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]+$

Path Parameters

projectId
string
required

The project's ID

labelId
string
required

The label's ID

Body

application/json
assetIds
string[]
required

Up to 50 assets

Required array length: 1 - 50 elements
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Response

What the request changed.

labelId
string
required
projectId
string
required
assetIds
string[]
required
assigned
boolean
required

True when the assets now have the label, false when it was removed