Skip to main content
Everabyte protects data with three related but distinct mechanisms. Confusing them leads to integrations that fail in production.

Retention values

File-level retention accepts:
Bucket-level retention accepts the same set except 30d and 45d. A bucket-wide write-once (WORM) policy shorter than 90 days is not offered. Retention is expressed as a period value, and the backend stores an expiry. Once active, the content is locked until that expiry.

Retention rules that affect your integration

Renaming, changing visibility, changing retention again, or deleting returns an error. Do not offer these actions in your UI when isRetention is true.
When a bucket has active retention, per-file retention changes are rejected, and files in that bucket cannot be soft- or hard-deleted even if they have no individual retention.
The lock is one-way until expiry. Plan retention at upload time rather than treating it as a toggle.

Versions

When a file is uploaded again with the same name and extension in the same folder scope, the backend can create a new version instead of a separate file. The upload response then has isUpdate: true. Use GET /files/{fileId}/versions to list versions. Each entry includes the version identifier, size, creation time, action, author metadata when resolvable, and an isCurrent flag. The current live object is synthesized into the list even when it has no separate version row.

The nested version response

Version endpoints wrap a service result inside the normal controller envelope. The list response looks like this:
Read data.data for the array. The inner status and message duplicate the outer values. This is current behavior, not a documentation error. The same nesting applies to version restore, version delete, and file restore-from-trash.

Version operations

Deleting the current version through the version endpoint is rejected. Delete the file itself instead. A restore of the already-current version is also rejected as a no-op. Restoring and deleting versions require write or delete capability. Downloading a version requires read capability.

Trash and restore

DELETE /files/delete/{fileId}?trash=soft marks the file deleted and starts the display window. trash=hard permanently removes it. Restore a soft-deleted file with:
Restoring a file that is not in trash returns 400. Restoring after the display window returns 410. The response payload is nested the same way as version operations. Folders have their own trash endpoints: DELETE /folders/delete/{folderId} and POST /folders/restore-from-trash/{folderId}.
Hard deletion is irreversible. Retention and legal hold can block it, but once it succeeds there is no restore path.
  1. Read isRetention and retentionPeriod before showing destructive actions.
  2. Treat trash=soft as the default delete.
  3. Require an explicit, user-confirmed action for trash=hard.
  4. Poll or refresh lists after mutations; do not assume local state matches server state.
  5. Handle 410 as “too late to restore”, not as a transient error.