Organizing: collections & webhooks
Group related assets into collections, and get HTTP notifications when asset and job state changes.
Collections
A collection is a named, flat group of assets — useful for shows, campaigns, or any grouping that doesn't belong on the asset record itself.
curl -X POST https://<your-instance>/api/v1/collections \
-H "Content-Type: application/json" \
-d '{"name": "Q3 keynotes"}'Add and remove assets with PUT /api/v1/collections/{id}/assets/{assetId} / DELETE /api/v1/collections/{id}/assets/{assetId}. Full shape in the Collections reference.
Deleting a collection
Deleting a collection never deletes its member assets — membership lives on the collection, so the delete just unlinks them.
An empty collection deletes outright. A non-empty one is refused, so you can't tear down a grouping you haven't looked at:
curl -i -X DELETE https://<your-instance>/api/v1/collections/<id>{
"error": "delete_blocked",
"message": "collection 01J8ZK9F4Q is in use (7 member asset(s))",
"reason": "member_of_collection",
"blockedBy": {
"jobIds": [],
"collectionIds": [
"01J8ZK9F4Q"
]
},
"memberCount": 7
}Branch on reason, never on the status code alone. member_of_collection means the collection still holds memberCount assets. Show the user what they're about to unlink, then echo that number back to confirm:
curl -i -X DELETE "https://<your-instance>/api/v1/collections/<id>?confirmMemberCount=7"That answers 204. The count must match the collection's current membership: if someone added or removed an asset in between, you get the same 409 member_of_collection back carrying the new authoritative memberCount — re-confirm with that value and retry. The delete is never silent, so you can't destroy a set that changed under you. ?force=true is the blind alternative; it skips the count check entirely.
A 409 with reason: "delete_protected" is a different condition and needs a different fix. It means the collection carries an explicit delete lock. There is no memberCount, both blockedBy arrays are empty, and neither ?confirmMemberCount= nor ?force=true gets past it:
{
"error": "delete_blocked",
"message": "collection 01J8ZK9F4Q is protected from deletion by an explicit lock",
"reason": "delete_protected",
"blockedBy": {
"jobIds": [],
"collectionIds": []
}
}Clear the lock with DELETE /api/v1/collections/{id}/lock first, then delete as normal. Treating delete_protected as a retryable confirmation prompt is the usual integration bug here — no number of retries will ever succeed.
Every parameter and the full 409 shape are in the Collections reference.
Webhooks
Register an HTTP endpoint to be notified as assets and jobs change state, instead of polling:
curl -X POST https://<your-instance>/api/v1/webhooks \
-H "Content-Type: application/json" \
-d '{"url": "https://your-app.example.com/hooks/videocore", "events": ["asset.ready", "transcode.complete", "package.complete"]}'Available events: asset.ready, asset.failed, transcode.complete, transcode.failed, package.complete, package.failed. Pass a secret to have deliveries signed. Full shape in the Webhooks reference.