---
title: "Preview which injected secrets a 'snapshot and delete' would remove"
method: GET
path: "/api/v0beta1/sandbox-snapshots/scrub-preview"
tags: ["SandboxSnapshots"]
---

# Preview which injected secrets a 'snapshot and delete' would remove

`GET /api/v0beta1/sandbox-snapshots/scrub-preview`

## Query parameters

- `sandbox` string — The sandbox whose injected secrets would be scrubbed.
- `by` 'name' | 'id' | 'ref' | 'name_or_id' — How to interpret `sandbox`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).
- `sandbox_id` string — Deprecated: use `sandbox` with `by=id` instead.

## Response `200`

Secrets that would be scrubbed and files reset to a baseline (paths + names only).

- SandboxScrubPreviewResponse
  - `files` string[], required
  - `restored_files` string[], required
  - `env_vars` string[], required

## Other responses

- `400` — Error
- `401` — Error
- `403` — Error
- `404` — Error
- `409` — Error
- `502` — Error

---

[API](https://skmtc.net/amika/apis/amika-api.md) · [All operations](https://skmtc.net/amika/apis/amika-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amika/amika-api/revisions/664536fccd0e/schema)
