Skip to content

Vaults

Vaults are containers that organize your files. Every file belongs to exactly one vault.

Vaults have a visibility setting that determines access control and encryption behavior:

PublicPrivate
AuthenticationFiles accessible without authRequires API key or JWT
EncryptionNone — files stored as plaintextClient-side AES-256-GCM
SharingDirect URLs anyone can accessOnly authenticated owner
Use casePublic assets, open dataSensitive documents, personal files

Every account has a default vault (public). It’s created automatically when your account is set up. You can use it immediately without creating a vault first.

// Public vault — no encryption
const publicVault = await tusky.vaults.create({
name: 'Public Assets',
visibility: 'public',
});
// Private vault — requires encryption setup
const privateVault = await tusky.vaults.create({
name: 'Sensitive Docs',
visibility: 'private',
});

Vaults can only be deleted when empty. Use force: true to move all files to trash first:

// Moves files to trash, then deletes the vault
await tusky.vaults.delete(vault.id, { force: true });

Deleted vaults go to trash with a 7-day grace period before permanent deletion.