PixViroDocs

Versions & trash

Overwrites keep history, deletes go to the trash, and published URLs never change meaning.

Versions

Uploading to an existing public ID with overwrite=true creates version n+1 and keeps version n — file, derivatives and URLs included. Every versioned URL you ever published (/v3/…) keeps returning the same image until that version expires, which is why versioned URLs can be cached forever. Unversioned URLs follow the latest version.

History is kept for a window that depends on your plan (7 days on Free up to a year on Scale), up to 50 versions per asset. Kept versions count as storage.

GET /v1/assets/{id}/versions Each version with its immutable url and expires_at
POST /v1/assets/{id}/versions/{n}/restore Make an old file current again (as a new version)
DELETE /v1/assets/{id}/versions/{n} Remove one old version now

Version numbers are never reused, even if you delete an asset and upload something new at the same public ID.

Trash

DELETE /v1/assets/{id} moves an asset to the trash: delivery stops immediately (404) and the CDN is purged, but the files are kept.

  • POST /v1/assets/{id}/restore brings it back with all its URLs.
  • Trashed assets are deleted for good after 30 days. Until then they still count as storage.
  • DELETE /v1/assets/{id}?permanent=true deletes for good right away.
  • A trashed asset keeps its public ID: uploading to it answers 409 public_id_in_trash unless you pass overwrite=true.
curl -X DELETE https://pixviro.com/v1/assets/$ASSET_ID -H "Authorization: Bearer $PIXVIRO_API_KEY"
curl -X POST https://pixviro.com/v1/assets/$ASSET_ID/restore -H "Authorization: Bearer $PIXVIRO_API_KEY"