---
title: "Start capturing a snapshot from a running sandbox"
method: POST
path: "/api/v0beta1/sandbox-snapshots"
tags: ["SandboxSnapshots"]
---

# Start capturing a snapshot from a running sandbox

`POST /api/v0beta1/sandbox-snapshots`

Validates the request, records a snapshot in the `capturing` state, and runs the (slow) Daytona capture in the background. Returns 202 immediately; poll the listing for the row to reach `active`/`failed`.

## Request body

- CreateSandboxSnapshotRequest
  - `sandbox_id` string — Source sandbox, by id.
  - `sandbox_name` string — Source sandbox, by name.
  - `sandbox_ref` string — Source sandbox, by id or name; rejected if both match.
  - `name` string, required
  - `description` string
  - `mode` 'scrub_and_delete' | 'full' — scrub_and_delete (default): remove Amika-injected secrets (credential files + injected env vars) from the sandbox, capture the snapshot from the clean filesystem, then delete the source sandbox. full: capture everything as-is — including secrets — and keep the sandbox running.

## Response `202`

Snapshot capture started.

- SandboxSnapshot
  - `id` string, required
  - `snapshot` string, required
  - `provider` string, required
  - `description` string, nullable, required
  - `source_sandbox_id` string, nullable, required
  - `source_sandbox_name` string, nullable, required
  - `repository_id` string, nullable, required
  - `repository_url` string, nullable, required
  - `base_snapshot` string, nullable, required
  - `sandbox_preset` string, nullable, required
  - `sandbox_size` string, nullable, required
  - `capture_mode` string, nullable, required
  - `state` string, required
  - `error_message` string, nullable, required
  - `created_at` union, required
    - string
    - string, date-time
  - `updated_at` union, required
    - string
    - string, date-time
  - `daytona` ExperimentalDaytonaSnapshot, nullable, required
    - `name` string, required
    - `state` string
    - `imageName` string
    - `cpu` number
    - `memory` number
    - `disk` number
    - `createdAt` union
      - string
      - string, date-time
    - `updatedAt` union
      - string
      - string, date-time

## 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)
