Branches and snapshots
Both are available on the Starter plan and above.
Branches
A branch is a full copy of a database, made into a new database with its own name. Use one to try a change without touching the original. Changes to a branch never reach the source database, and there is no way to merge a branch back.
Create a branch
curl -X POST https://api.vaultdb.io/api/databases/shop/branches \
-H "Authorization: Bearer $VAULTDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "shop-test" }'
name follows the database name rules. This needs the Databases.edit permission.
Returns 201:
{
"message": "Branch 'shop-test' created from 'shop'",
"branch": { "id": "…", "dbid": "shop-test", "source": "shop", "tables": 3 }
}
The branch copies every table and row, and the source's row-level policies. It does not copy webhooks or scheduled queries.
A branch is a database: it counts toward your plan's database limit, and you use it at /api/databases/shop-test/... like any other. A source database can have at most 10 branches.
List and delete branches
curl https://api.vaultdb.io/api/databases/shop/branches \
-H "Authorization: Bearer $VAULTDB_API_KEY"
Returns { "branches": [...], "count": n }. To delete a branch, delete it as a database:
curl -X DELETE https://api.vaultdb.io/api/databases/shop-test \
-H "Authorization: Bearer $VAULTDB_API_KEY"
Snapshots
A snapshot is a point-in-time copy of one database, kept by VaultDB.
Take a snapshot
curl -X POST https://api.vaultdb.io/api/databases/shop/snapshots \
-H "Authorization: Bearer $VAULTDB_API_KEY"
This needs the Databases.edit permission. Returns 201:
{
"message": "Snapshot created",
"snapshot": { "id": "2026-10-07T12-00-00-000Z", "database": "shop", "timestamp": "2026-10-07T12:00:00.000Z" }
}
A database can have at most 10 snapshots. Delete one to take another. Snapshots do not count toward your storage limit.
List snapshots
curl https://api.vaultdb.io/api/databases/shop/snapshots \
-H "Authorization: Bearer $VAULTDB_API_KEY"
Returns { "snapshots": [...], "count": n }, newest first. Each snapshot has id, database, timestamp and sizeBytes.
Restore a snapshot
curl -X POST https://api.vaultdb.io/api/databases/shop/snapshots/2026-10-07T12-00-00-000Z/restore -H "Authorization: Bearer $VAULTDB_API_KEY"
This replaces the whole database with the snapshot. Everything written after the snapshot was taken is lost, so take a new snapshot first if you may need the current data. The snapshot itself is kept, and you can restore it again later.
This needs the Databases.edit permission and a Starter plan or above. Returns { "message": "Database restored from snapshot", "snapshot": { "id": "...", "database": "shop" } }.
A restore does not send webhooks or realtime events for the rows it changes. Requests that are running against the database at the moment of the restore can fail; send them again.
Delete a snapshot
curl -X DELETE https://api.vaultdb.io/api/databases/shop/snapshots/2026-10-07T12-00-00-000Z -H "Authorization: Bearer $VAULTDB_API_KEY"
This needs the Databases.edit permission. It works on any plan, so you can still delete snapshots after moving to the Free plan. Deleting a database also deletes all of its snapshots.
What snapshots cannot do yet
The API has no endpoint to download a snapshot. If you need a copy you can work with, create a branch instead.