Skip to main content
POST
Create a sandbox

Authorizations

Authorization
string
header
required

API Key or Access Token, always sent as Authorization: Bearer <token>. The gateway recognizes the token type automatically.

Headers

Idempotency-Key
string

Optional caller-generated idempotency key (a UUID is recommended). Matched byte-for-byte: 1-64 printable ASCII characters, no whitespace. Absent means no deduplication. The same key with a different request body returns 400 Sandbox.IdempotentParameterMismatch. Echoed on responses; replays add Idempotency-Replayed: true. Keys are remembered for 24 hours.

Required string length: 1 - 64

Body

application/json
template_id
string
required

Template identifier or name. Mutually exclusive with snapshot_id: both or neither returns 400 Sandbox.SourceConflict. A template that cannot be found in the effective IDC returns 400 Parameter.Invalid.

snapshot_id
string<uuid>

Ready durable snapshot identifier. Mutually exclusive with template_id. Compute resources are inherited from the snapshot. A snapshot that does not exist returns 404 Resource.NotFound.

product
string

Optional product SKU (see GET /api/v2/products, for example gmi.sandbox.large). IDCs that do not support selecting a product at create time return 422 Template.ProviderNotSupported.

Example:

"gmi.sandbox.large"

idc_name
string

Target data center name, e.g. us-central1-c. Optional: when omitted, the organization's configured default data center is used (maintained by the platform administrator); if the organization has no default configured, the request returns 400. If the effective data center is under maintenance, the request returns 409 IDC.UnderMaintenance. Note that Templates are bound to a data center: the effective data center (whether explicit or default) must match the one that owns the Template or snapshot referenced by the request, otherwise a Template is reported as not found (400 Parameter.Invalid); a snapshot that exists but belongs to another data center also returns 400 Parameter.Invalid (404 Resource.NotFound is returned only when the snapshot does not exist).

timeout
integer<int64>

Time-to-live in seconds. When omitted, 300 seconds is used. An explicit value must be at least 1; 0 or a negative value returns 400 Parameter.Invalid. At most 86400 (24 hours) in the selected IDC; a larger value returns 400 Parameter.Invalid. The limit can differ by IDC.

Required range: x >= 1
env_vars
object
metadata
object

Customer-defined key/value pairs; the platform does not interpret them. The list endpoint can filter by them.

secure
boolean
default:false

Enables traffic-access-token authentication on the user endpoint.

auto_pause
boolean
default:false

When true, the sandbox is paused instead of deleted when timeout expires (see lifecycle.on_timeout on the detail endpoint). IDCs that cannot honour this reject the request.

egress_control
boolean
default:false

Whether to enable dedicated egress control for this sandbox. false means public egress; true starts from deny-all and allows only the egress allowlist. This switch cannot be changed after creation.

egress
object

Initial full allowlist when egress_control is true; omitted or empty means deny-all.

default_user
object

OS identity for data-plane operations that do not specify a user. Not supported in every IDC.

Response

Sandbox created

request_id
string
required

Request tracing ID

data
object
required