Skip to main content
POST
Save a sandbox's system files and storage as a snapshot.

Authorizations

Authorization
string
header
required

Opaque instabox access token (1 hour). Refresh with /v1/auth/refresh (refresh token valid 30 days, rotates on use).

Headers

Idempotency-Key
string
required

Client-generated key, 1-200 printable ASCII characters, scoped to the user. Same key and same method+path+body returns the original response; same key with a different request returns 409 idempotency_conflict. Records are kept for 7 days.

Required string length: 1 - 200
Pattern: ^[\x21-\x7e]+$

Path Parameters

id
string
required

Sandbox ID (m_ + 26 lowercase base32 characters).

Pattern: ^m_[a-z2-7]{26}$

Body

application/json
name
string
required

Unique among the caller's snapshots; 1-63 of a-z, 0-9, '-', starting with a letter or digit.

description
string
rootOnly
boolean
default:false

Save the system files only, not the storage (/data).

forFork
boolean
default:false

Saved to fork its source (instabox fork, when the native fork cannot run). For a free source, the server records its max-run window as activity extended it, and a sandbox the same user creates from this snapshot in the next 30 minutes starts with that window, as a native fork does. Names no window.

Response

The snapshot (of a stopped sandbox).

A saved copy of a sandbox (software and files). New sandboxes can be created from it. It belongs to its source sandbox's org: every member of the org sees, uses and deletes it.

id
string
required

sn_... (im_... for older snapshots).

name
string
required

Unique among the org's live snapshots.

orgId
string
required

The org the snapshot belongs to (its source sandbox's).

sourceMachineId
string
required
sourceSnapshotSeq
integer<int64>
required

The source sandbox's saved state (storage.snapshotSeq) this snapshot was taken from; 0 for a live snapshot of a sandbox that was never stopped.

status
enum<string>
required

ready can be used. A snapshot of a running sandbox is pending while it uploads (its sizes are the sandbox's until then), then ready or failed.

Available options:
pending,
ready,
failed
template
object
required
rootSizeBytes
integer<int64>
required

The logical size of the system disk a sandbox created from it gets (its provisioned capacity), not the bytes stored: a snapshot is saved sparse and compressed.

createdAt
string<date-time>
required
description
string
error
string

Why a failed snapshot failed.

dataSizeBytes
integer<int64>

The logical size of the storage disk (/data) a sandbox created from it gets, not the bytes stored (the saved data is sparse and compressed); absent for system-files-only snapshots. Sandboxes created from it get at least this much storage.

exclusiveBytes
integer<int64>
deprecated

No longer computed; servers leave it out. (Was the stored bytes only this snapshot references.)

defaultSpec
object

The size a sandbox created from this snapshot gets when the create names none: the caller's plan default for vCPUs and memory (limits.machineSpec, 4 vCPU / 8 GiB on api.instabox.sh), not the source sandbox's size, so a snapshot of a 2/4 box creates a 4/8 one unless the create passes vcpus and memMiB; plus the storage (/data) and system disk sizes the snapshot was saved with, which a created sandbox gets at least. Absent when its template is unknown.

guestUser
string

The source sandbox's Linux user (Machine.guestUser), which a sandbox created from this snapshot keeps unless the create names another. dev for snapshots of sandboxes from older templates.

visibility
enum<string>

Who can create from the snapshot (docs/community-templates.md): private (the default, its org's members), community (every signed-in account) or official (listed next to the built-in templates). Absent on older servers: treat as private. Handlers do not set community or official yet.

Available options:
private,
community,
official
publishedAt
string<date-time>

When the visibility became community or official.

publisherLogin
string

Who shared or published it.