/v1/run/data-retention, take your dashboard session or an owner key, and need the account.owner role for the destructive ones.
Switches
A switch that is not sent keeps its value; an empty body is a 400. Sending a switch records your choice and the time (
updated_at) and publishes it to the sandbox hosts; if that publishing fails the answer is 503 unavailable, the choice stays stored, and sending the same change again publishes it. Billing usage rows are never switched off: they are the record your invoice is built from.
What each switch does
zero_data_retention. A command run withexecleaves no record:GET /sandboxes/{id}/command-historystays empty. A command started withPOST /sandboxes/{id}/commands(and a process of the in-sandbox envd API) keeps its output only so that you can collect the result: it is readable while it runs and for 60 seconds after it ended, then it is dropped with its output.GET /sandboxes/{id}/logsanswers200with emptylogsandlogEntriesand"zeroDataRetention": true, so an empty log is never mistaken for a quiet sandbox. Only the API process’s memory ever held this history; nothing is written to disk. The switch applies to commands that start after it reached the host.snapshots_off_on_stop. A sandbox created afterwards is killed when its timeout runs out, even if the create asked forautoPause,lifecycle.onTimeout: "pause"orautoResume; those settings are dropped for the account.POST /sandboxes/{id}/pause(and a stop through the Daytona or compatible surfaces that pauses) answers409witherror_codesnapshots_off; delete the sandbox instead. A sandbox that was created before the switch was turned on keeps the timeout action it was created with, and snapshots you take yourself withPOST /sandboxes/{id}/snapshotare not affected.monitoring_off.GET /sandboxes/{id}/metricsanswers an empty list while the switch is on. Billing usage rows stay.
Delete all my data
202 with an operation. Control then removes, with your own token: every sandbox (running and paused, with its command history), every saved snapshot, and when include_webhooks is true every webhook endpoint with its delivery log. Poll GET /v1/run/data-retention/deletions/{id} until status is succeeded or failed; counts shows what was removed and error says which step failed. GET /v1/run/data-retention/deletions lists the latest operations.
- Webhook delivery logs are removed only together with their endpoint.
- One deletion runs per account at a time; a second start answers 409.
- It is safe to start again after a failure: the deletion only removes what is still there. An operation that is still
runningafter 30 minutes (control restarted) is closed asfailedand can be restarted. - The call needs the owner and, when the owner has a second factor enrolled, a step-up (
mfa_requiredotherwise).