POST /v1/sandboxes

Creates a new sandbox environment for executing code in an isolated virtual machine. A sandbox can be initialized from various sources including Git repositories, tarballs, or existing snapshots. Once created, you can execute commands, read/write files, and manage the sandbox lifecycle.

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.

networkPolicy Object No

Network access policy for the sandbox.\n Controls which external hosts the sandbox can communicate with.\n Use "allow-all" mode to allow all traffic, "deny-all" to block all traffic or "custom" to provide specific rules.

networkPolicy.allowedCIDRs[] Array No

List of IP address ranges (in CIDR notation) the sandbox is allowed to connect to. Traffic to these addresses bypasses domain-based restrictions.

networkPolicy.deniedCIDRs[] Array No

List of IP address ranges (in CIDR notation) the sandbox is blocked from connecting to. These rules take precedence over all allowed rules.

networkPolicy.mode String Yes

The network access policy mode. Use "allow-all" to permit all outbound traffic. Use "deny-all" to block all outbound traffic. Use "custom" to specify explicit allow/deny rules.

Valid values:

  • "deny-all"
  • "default-allow"
  • "default-deny"
  • "allow-all"
  • "custom"
networkPolicy.allowedDomains[] Array No

List of domain names the sandbox is allowed to connect to. Only applies when mode is "custom". Supports wildcard patterns (e.g., "*.example.com" matches all subdomains).

env Object No

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

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

ports[] Array No

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

timeout Integer No

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

runtime String No

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

Valid values:

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

Default value: "node24"

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.