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

# Start capturing a snapshot from a running sandbox

`POST /api/v0beta1/rig-snapshots`

## Request

- Base URL: `https://app.amika.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://app.amika.dev/api/v0beta1/rig-snapshots`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `wos-session`

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
  - `host_id` string, nullable, 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

## Changes

- **2026-10-16** `d141c3e79526`: 1 info
  - added the required property `host_id` to the response with the `202` status
- **2026-09-16** `25ba06b40ead`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/amika/apis/amika-api/changes/api/v0beta1/rig-snapshots/post.md)

---

[API](https://skmtc.dev/amika/apis/amika-api.md) - [All operations](https://skmtc.dev/amika/apis/amika-api/llms.txt) - [OpenAPI document](https://skmtc.dev/amika/apis/amika-api/revisions/86f031a957c1?raw)
