delete a snapshot
Captures of one machine form a chain in the order they were taken, and only the newest can be removed. An older one cannot be deleted until the newer ones are gone.
DELETE
/v1/snapshots/{snapshot_id}Authorization
AuthorizationBearer token · headerrequiredan organization api key. browser clients use the session cookie instead.
or
computer_sessionAPI key · cookierequiredfirst-party httponly browser session; never readable from javascript.
Path parameters
snapshot_idstringrequiredmatches ^snp_[0-9a-z]{20,32}$
Header parameters
idempotency-keystringmin length 1 · max length 255
Responses
202OK
idstringrequiredsnapshot identifier
matches ^snp_[0-9a-z]{20,32}$
organization_idstringrequiredorganization identifier
matches ^org_[0-9a-z]{20,32}$
machine_idstringrequiredmachine identifier
matches ^mch_[0-9a-z]{20,32}$
namestring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anystateSnapshotStaterequiredAllowed:
pendingreadyerrordeletingoriginSnapshotOriginrequiredAllowed:
manualstoptemplateimage_idstringrequiredmachine image identifier
matches ^img_[0-9a-z]{20,32}$
includes_memoryanyrequiredalways false in v1; snapshots capture disk state only
size_bytesinteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyerrorstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anymetadataobjectrequiredcaller-defined key/value pairs, echoed back unchanged
created_atstring<date-time>requiredready_atstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyexpires_atstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
any400invalid request
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any401unauthenticated
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any402quota exceeded
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any403permission denied
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any404not found
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any409conflict with current state
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any412precondition failed
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any429rate limited
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any500internal error
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any501unsupported operation
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any503compute unavailable
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anyTry it
Server
Authorization
Parameters
Request
curl -X DELETE "https://api.raster.sh/v1/v1/snapshots/snp_01h8xk2q4v9m3n7p5r0t" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.raster.sh/v1/v1/snapshots/snp_01h8xk2q4v9m3n7p5r0t", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.delete(
"https://api.raster.sh/v1/v1/snapshots/snp_01h8xk2q4v9m3n7p5r0t",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"id": "snp_01h8xk2q4v9m3n7p5r0t",
"organization_id": "org_01h8xk2q4v9m3n7p5r0t",
"machine_id": "mch_01h8xk2q4v9m3n7p5r0t",
"name": "string",
"state": "pending",
"origin": "manual",
"image_id": "img_01h8xk2q4v9m3n7p5r0t",
"includes_memory": false,
"size_bytes": 9007199254740991,
"error": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"created_at": "2026-08-19T12:00:00Z",
"ready_at": "2026-08-19T12:00:00Z",
"expires_at": "2026-08-19T12:00:00Z"
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}