Skip to content
Docs

Delete a sandbox

DELhttps://api.vercel.com/v2/sandboxes/{name}
Deletes a sandbox by name. If sandboxes are currently running, they will be stopped first. This operation deletes all sandbox entities with the given name and the named sandbox metadata. Returns 404 if the sandbox does not exist or was deleted by a concurrent request.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.sandboxes.deleteSandbox({
name: "my-sandbox",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"sandbox": {
"architecture": "amd64",
"createdAt": "1750344501629",
"currentSessionId": "example_id",
"currentSnapshotId": "example_id",
"cwd": "/vercel/sandbox",
"expiresAt": "1750344801629",
"failoverRegions": [],
"image": "my-team/my-project/my-repo@sha256:2c4e8f9a1b3d5e7f091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708",
"keepLastSnapshots": {
"count": "5",
"deleteEvicted": "true",
"expiration": "604800000"
},
"memory": "1024",
"mounts": "value",
"name": "my-sandbox",
"networkId": "example_id",
"networkPolicy": {
"allowedCIDRs": [],
"allowedDomains": [],
"deniedCIDRs": [],
"mode": "allow-all",
"s3Key": "string"
},
"persistent": "true",
"region": "iad1",
"runtime": "node22",
"snapshotExpiration": "604800000",
"status": "running",
"statusUpdatedAt": "1750344501629",
"tags": "[object Object]",
"timeout": "300000",
"totalActiveCpuDurationMs": "5000",
"totalDurationMs": "60000",
"totalEgressBytes": "4096",
"totalIngressBytes": "2048",
"updatedAt": "1750344501629",
"v0": "false",
"vcpus": "2"
}
}
AuthorizationbearerToken

Default authentication mechanism

namestringRequired
The sandbox name to delete.
projectIdstringOptional
The project ID that owns the named sandbox. When provided, takes precedence over OIDC project context.
deleteOrphanSnapshotsbooleanOptional
When true, snapshots of the deleted sandbox that are not referenced by any other sandbox are also deleted asynchronously. Defaults to false.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
sandboxobjectRequired
This object contains information related to a Vercel NamedSandbox.
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