---
title: "Delete a sandbox"
method: DELETE
path: "/v2/sandboxes/{name}"
tags: ["sandboxes"]
---

# Delete a sandbox

`DELETE /v2/sandboxes/{name}`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v2/sandboxes/{name}`
- Auth: HTTP bearer

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. When the config item is already missing, the returned sandbox uses stored metadata and defaults; config fields may be stale.

## Path parameters

- `name` string, required: The sandbox name to delete.

## Query parameters

- `projectId` string: The project ID that owns the named sandbox. When provided, takes precedence over OIDC project context.
- `deleteOrphanSnapshots` boolean: When true, snapshots of the deleted sandbox that are not referenced by any other sandbox are also deleted asynchronously. Defaults to false.
- `teamId` string
- `slug` string

## Response `200`

- object
  - `sandbox` NamedSandbox, required: This object contains information related to a Vercel NamedSandbox.
    - `architecture` 'amd64' | 'arm64': CPU architecture of the sandbox. This value does not change.
    - `createdAt` number, required: The time when the named sandbox was created, in milliseconds since the epoch.
    - `currentSessionId` string, required: Current session ID the sandbox is pointing to.
    - `currentSnapshotId` string: Current snapshot ID that the named sandbox is pointing to.
    - `cwd` string: The working directory of the sandbox.
    - `expiresAt` number: The time at which the currently running sandbox will time out, in milliseconds since the epoch. Only present while a session is running.
    - `failoverRegions` string[]: The regions the sandbox fails over to. Empty when it does not fail over.
    - `image` string: Owner-qualified, digest-pinned reference of the container image the sandbox was created from ("{team}/{project}/{repository}@{manifestDigest}").
    - `keepLastSnapshots` object: Keep-last snapshot configuration.
      - `count` number, required: Number of most recent snapshots to keep.
      - `deleteEvicted` false | true, required: Whether to immediately delete evicted snapshots.
      - `expiration` number: Expiration time in milliseconds for kept snapshots.
    - `memory` number: Memory allocated in MB.
    - `mounts` object: Key-value pairs of mount path and drive.
    - `name` string, required: The unique identifier of the sandbox.
    - `networkId` string: The Connect network id for the target Secure Compute private network.
    - `networkPolicy` object: Network policy configuration.
      - `allowedCIDRs` string[]
      - `allowedDomains` string[]
      - `deniedCIDRs` string[]
      - `mode` 'allow-all' | 'custom' | 'default-allow' | 'default-deny' | 'deny-all', required
      - `s3Key` string
    - `persistent` false | true, required: Whether the sandbox persists its state across restarts via automatic snapshots.
    - `region` string: The region the sandbox is pinned to: the region stored on the sandbox, otherwise the platform default. Where a running session actually landed is reported by `session.region`.
    - `runtime` string: Runtime identifier.
    - `snapshotExpiration` number: Default snapshot expiration time in milliseconds. 0 means no expiration.
    - `status` 'running' | 'stopped' | 'stopping', required: The status of the current sandbox.
    - `statusUpdatedAt` number, required: The time when the sandbox status was last updated, in milliseconds since the epoch.
    - `tags` object: Key-value tags attached to the named sandbox.
    - `timeout` number: Timeout in milliseconds.
    - `totalActiveCpuDurationMs` number: Cumulative active CPU duration in milliseconds across all sandbox runs.
    - `totalDurationMs` number: Cumulative wall-clock duration in milliseconds across all sandbox runs.
    - `totalEgressBytes` number: Cumulative egress bytes across all sandbox runs.
    - `totalIngressBytes` number: Cumulative ingress bytes across all sandbox runs.
    - `updatedAt` number, required: The time when the named sandbox was last updated, in milliseconds since the epoch.
    - `vcpus` number: Number of virtual CPUs allocated.
    - `workloadType` 'sandbox' | 'v0': The workload type of this sandbox.

## Other responses

- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`
- `422`
- `429`

## Changes

- **2026-10-26** `01d3fe4ea5c3`: 1 warning, 1 info
  - removed the optional property `sandbox/v0` from the response with the `200` status
  - added the optional property `sandbox/workloadType` to the response with the `200` status
- **2026-10-24** `4a06e85c2848`: 1 info
  - added the non-success response with the status `422`
- **2026-10-09** `336a06c75674`: 1 info
  - added the optional property `sandbox/mounts/additionalProperties/snapshot` to the response with the `200` status
- **2026-10-01** `9958fd10bb05`: 1 info
  - added the optional property `sandbox/v0` to the response with the `200` status
- **2026-09-18** `c32b8afee578`: 1 info
  - added the optional property `sandbox/architecture` to the response with the `200` status

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v2/sandboxes/:name/delete.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
