Skip to main content

Update Data - Bulk

POST 

/api/v1/assets/bulk/data/update

Apply one metadata change to up to 500 assets in one request: set the same fields on a whole selection ("approve every image in this collection") instead of calling Update Data once per asset.

Each asset gets the single endpoint's APPEND update, independently: data is merged into the asset's data, list_ops adds or removes list values, remove_keys deletes fields, and data_schema_id (optional) moves every asset to that schema. One asset failing never stops the others; it is listed in failed with a reason.

REQUEST JSON BODY​

{
"asset_ids": ["99d819953914402babbdeb68337ea6a3", "a211ab5f351f4b398426efb59b0c72a3"],
"data": {"status": "Approved"},
"list_ops": {"tags": {"add": ["salsify"], "remove": ["draft"]}},
"remove_keys": ["old_field"]
}
KeyTypeDescription
asset_idsarrayRequired. 1 to 500 asset ids. Duplicates are ignored
dataJSONFields to set on every asset, merged as in APPEND mode. Reserved _filespin fields are ignored
list_opsJSONValues to add to or remove from list fields, as on Update Data
remove_keysarrayFields to delete, as on Update Data
data_schema_idintegerOptional. Moves every updated asset to this schema
modestringOptional. APPEND, the only mode: REPLACE is refused, because replacing the whole data of many assets would wipe every field the request does not list
embargo_until, rights_expire_atstring or nullOptional. Embargo and rights-expiry dates, see below

The request must change something: data, list_ops, remove_keys, data_schema_id, embargo_until or rights_expire_at. list_ops and remove_keys follow the same rules and limits as on the single endpoint, and a field can appear in only one of data, list_ops and remove_keys. When the asset has a schema (or data_schema_id names one), the fields this request sets are validated against it; an asset that fails validation is reported as invalid and left unchanged.

Each asset is updated under its own update lock, as on the single endpoint, so a concurrent update to the same asset is never lost. An asset whose lock does not come free within 2 seconds is reported as locked and not retried; send it again.

Like async=1 on the single endpoint, Get Data reflects the change at once but search catches up a few seconds later. Each asset whose metadata changes fires its own file-data-updated webhook.

Embargo and rights-expiry dates​

Set, move or clear the dates on every asset in the request, as on Update Data: embargo_until and/or rights_expire_at at the top level (ISO 8601 date-time with Z or an offset), or the built-in schema fields embargo_until and expiration_date (YYYY-MM-DD, the last day the asset may be used, stored as rights_expire_at = the next day at 00:00 UTC) inside data. null clears a date. The dates are stored on the asset, never in data. See Embargo and Rights Expiry.

{
"asset_ids": ["99d819953914402babbdeb68337ea6a3", "a211ab5f351f4b398426efb59b0c72a3"],
"embargo_until": "2027-01-15T09:00:00Z",
"data": {"expiration_date": "2027-03-31"}
}
  • Changing embargo_until needs the EDIT_EMBARGO_ASSET permission, changing rights_expire_at needs EDIT_AVAILABILITY (both on Admin and Manager, and Asset Manager where that role exists). Sending the value an asset already has is not a change and needs nothing.
  • Setting a date on an asset that has none needs the Scale or Enterprise plan. Moving or clearing an existing date is allowed on every plan.
  • Any other update to an embargoed asset needs EDIT_EMBARGO_ASSET, and to a rights-expired asset EDIT_AVAILABILITY.
  • A date that cannot be parsed, a date-time without a time zone, or the same field at the top level and in data with different values refuses the whole request with 400 and error: invalid_availability_value, as on Update Data.
  • When the request gives both dates and rights_expire_at is not after embargo_until, the whole request is refused with 400 and error: invalid_availability_window.
  • Permission, plan and window checks are otherwise made per asset, and an asset that fails one is listed in failed: no_access for a missing permission, plan_upgrade_required for a new date without the plan, invalid when one new date and the asset's stored other date would make a window that never opens. The message says which.
  • Each asset is all or nothing: its data is validated before its dates are written, so an asset reported in failed keeps its previous dates and data.

HTTP RESPONSE​

200 whenever the request itself is valid, even if some or all assets failed:

{
"status": "OK",
"updated": ["99d819953914402babbdeb68337ea6a3"],
"failed": [
{"asset_id": "a211ab5f351f4b398426efb59b0c72a3", "reason": "not_found"}
],
"not_ready": [],
"undo_id": "5b0e3c7a9d2f4e8b8c1a6f3d2e9b7c41",
"job_id": 1234
}
KeyDescription
updatedAssets that were updated
failedAssets that were not updated, each with asset_id, reason and, for most reasons, a message
not_readyUpdated assets that are still processing (status not OK); their search entry is updated once processing finishes
undo_idId to undo this update with Undo Update Data - Bulk. null when nothing was updated
job_idThe BULK_METADATA_EDIT job recording the outcome, or null if it could not be recorded

failed[].reason is one of:

reasonMeaning
not_foundNo such asset, or it is embargoed / rights-expired and the caller lacks VIEW_UNAVAILABLE_ASSET
no_accessThe caller may not edit this asset, or lacks the permission for a date change or for writing to an embargoed / expired asset
trashedThe asset is in the trash
lockedThe asset is being updated by another request. Retry it
invalidThe change cannot be applied to this asset: schema validation, list_ops on a field that is not a list, or an embargo / expiry window that would never open
plan_upgrade_requiredSetting a new embargo or expiry date needs the Scale or Enterprise plan
errorUnexpected error. Retry the asset

Job and notification​

Every bulk update is recorded as a BULK_METADATA_EDIT job: COMPLETED when at least one asset was updated, ERROR when none was. Get Job returns its summary in message (for example 2 updated, 1 failed), the request's asset_count, fields and data_schema_id in input, and in callback the counts (summary), up to 50 failures, undo_id, undo_expires_at and, after an undo, undone_at and the undo's outcome.

The user who made the change also gets a notification, "Metadata update finished: ...", linking to the job in the Dashboard, so the outcome can be reviewed, and undone, later.

API Limits​

  • At most 500 assets per request.
  • By default each user can make one bulk update or bulk undo a minute (the two share one allowance). A further call within the minute is refused with 429 ("code": "rate_limited") and a Retry-After header. Bulk updates and undos also count against the account's rate limit by the number of assets they carry; an undo counts as the largest update.

Request​

Responses​

The request was processed. Check failed for assets that were not updated.