Delete all storage backups
clear_storage_backups
Permanently deletes every storage backup of a site in one call, leaving the live storage of the site untouched.
It is the same as Delete all storage backups in the editor. All of the archives are destroyed and cannot be recovered, so the site is left with no copy of its files from any earlier moment, and the daily backup only begins building that history again from its next run. Deleting them does not hand any manual backup slot back.
An archive still being taken is left alone. While a restore of the site's storage is running, the whole call is refused with a 409 and A restore of this storage is still running, so its backups cannot be deleted yet. Try again when it finishes!, and get_storage_restore_status says when that restore ends.
The response counts removed, the bytes freed, failed and pending. A failed one could not be reached and is still there, so call it again. pending counts the archives still being taken that were left alone, which stay in the list and read ready or failed in list_storage_backups when they finish.
It needs the Delete projects permission in the workspace. The tool tells the client to read the whole list with list_storage_backups and confirm it with you before calling it, and never to call it to tidy up on its own initiative. See Delete a backup.
Request
Call it with a POST to https://api.modulify.ai/v1/clear_storage_backups, sending the inputs below as a JSON object. The token needs the sites:delete scope.
This method is marked destructive: it deletes or overwrites data. Check the inputs before you call it, and send an Idempotency-Key header whenever you might retry it.
curl -X POST https://api.modulify.ai/v1/clear_storage_backups \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the clear_storage_backups tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site whose storage backups should all be deleted. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.