POST /v2/sandboxes

Creates a named sandbox environment. Named sandboxes have a unique name within a project and support automatic snapshotting on shutdown.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
teamId String No

The Team identifier to perform the request on behalf of.

slug String No

The Team slug to perform the request on behalf of.

Request body fields

Name Type Required Description
source No

The source from which to initialize the sandbox filesystem. Can be a Git repository, a tarball URL, or an existing snapshot.

projectId String No

The target project slug or ID in which the sandbox will be assigned to.

env Object No

Default environment variables for the sandbox. These are inherited by all commands unless overridden.

persistent Boolean No

Whether the sandbox persists its state across restarts via automatic snapshots. Defaults to true.

Default value: true

networkPolicy No
name String No

Name for the sandbox. Must be unique per project and URL-safe (alphanumeric, hyphens, underscores).

resources Object No

Resources to define the VM

resources.memory Integer No

The amount of memory in megabytes to allocate to the sandbox. Must equal vcpus * 2048.

resources.vcpus Integer No

The number of virtual CPUs to allocate to the sandbox. Must be 1, or an even number.

Default value: 2

tags Object No

Key-value tags to associate with the sandbox. Maximum 5 tags.

ports[] Array No

List of ports to expose from the sandbox. Each port will be accessible via a unique URL. Maximum of 15 ports can be exposed.

timeout Integer No

Maximum duration in milliseconds that the sandbox can run before being automatically stopped.

keepLastSnapshots Object No

Protect the N most recent snapshots with different expiration/deletion behavior.

keepLastSnapshots.expiration No

Expiration time in milliseconds for kept snapshots. Falls back to snapshotExpiration.

keepLastSnapshots.deleteEvicted Boolean No

Whether to immediately delete evicted snapshots. Defaults to true.

keepLastSnapshots.count Integer Yes

Number of most recent snapshots to keep.

runtime String No

The runtime environment for the sandbox. Determines the pre-installed language runtimes and tools available.

Valid values:

  • "node22"
  • "python3.13"
  • "node24"
  • "node26"

Default value: "node24"

mounts Object No

List of drives to mount to the sandbox at the provided path.

mounts.name Object No
mounts.name.drive String Yes

Name of the drive to mount. The drive must already exist.

mounts.name.mode String No

Mount the drive read-only or read-write.

Valid values:

  • "read-write"
  • "read-only"

Default value: "read-write"

snapshotExpiration No

Default snapshot expiration time in milliseconds. Set to 0 to disable expiration. When set, this value is used as the default expiration for all snapshots created for this sandbox.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.