curl --request DELETE \
--url https://api.instabox.sh/v1/snapshots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.instabox.sh/v1/snapshots/{id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.instabox.sh/v1/snapshots/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instabox.sh/v1/snapshots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.instabox.sh/v1/snapshots/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.instabox.sh/v1/snapshots/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instabox.sh/v1/snapshots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}Delete a snapshot.
Sandboxes created from it are not affected. Its data is cleaned up once no sandbox needs it. Any member of the snapshot’s org, or an admin, may delete it (another org’s is 404). API keys: needs one of the scopes images:delete.
curl --request DELETE \
--url https://api.instabox.sh/v1/snapshots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.instabox.sh/v1/snapshots/{id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.instabox.sh/v1/snapshots/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instabox.sh/v1/snapshots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.instabox.sh/v1/snapshots/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.instabox.sh/v1/snapshots/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instabox.sh/v1/snapshots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"operationId": "<string>",
"reason": "missing_key",
"hint": "<string>",
"docs": "<string>",
"docs_url": "<string>",
"requiredScopes": [
"<string>"
],
"retryAfterSeconds": 2,
"at": "2023-11-07T05:31:56Z"
}
}Authorizations
Opaque instabox access token (1 hour). Refresh with /v1/auth/refresh (refresh token valid 30 days, rotates on use).
Headers
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.
1 - 200^[\x21-\x7e]+$Guard against deleting the wrong resource: the ID or the exact name of
the sandbox or snapshot being deleted. When sent, any other value
(empty, another resource's name or ID, or the header twice) is
409 delete_confirmation_required and nothing is deleted; the
Idempotency-Key can then be reused. A sandbox delete with an API key
created on or after the server's confirmDeleteKeysFrom cutover must
send it (without it: the same 409, naming the ID to send); otherwise,
without the header, the delete proceeds as before (an API key's
response then carries a Warning header). The instabox CLI, the SDKs,
the hosted MCP server and the dashboard send it.
Path Parameters
Snapshot ID (sn_, or im_ for older snapshots, + 26 lowercase base32 characters).
Response
Deleted.
Was this page helpful?