Skip to content
Docs

Delete a snapshot

DELhttps://api.vercel.com/v2/sandboxes/snapshots/{snapshotId}
Permanently deletes a snapshot and frees its associated storage. This action cannot be undone. After deletion, the snapshot can no longer be used to create new sessions.
https://api.vercel.com/v2/sandboxes/snapshots/{snapshotId}
const response = await fetch('https://api.vercel.com/v2/sandboxes/snapshots/snapshotId?teamId=string&slug=string', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
{
"snapshot": {
"id": "snap_123a6c5209bc3778245d011443644c8d27dc2c50",
"sourceSessionId": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50",
"region": "iad1",
"regions": [],
"status": "created",
"sizeBytes": "104857600",
"expiresAt": "1750344501629",
"createdAt": "1750344501629",
"updatedAt": "1750344501629",
"lastUsedAt": "1750344501629",
"creationMethod": "manual",
"parentId": "snap_parent123"
}
}
AuthorizationbearerToken

Default authentication mechanism

snapshotIdstringRequired
The unique identifier of the snapshot to delete.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
snapshotobjectRequired
This object contains information related to a Snapshot of a Vercel Sandbox session (v2 API).
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
429Error