---
search:
  tags:
    - sandboxes
    - POST
seo:
  description: >-
    Enforces the org's quotas (running sandboxes, total sandboxes), while
    billing is off for… Reference for the POST /v1/sandboxes endpoint in the
    pols.so API.
sidebar:
  label: Create a sandbox from a template and start it
  badge: POST
title: Create a sandbox from a template and start it
type: openapi-operation
---
Enforces the org's quotas (running sandboxes, total sandboxes),
while billing is off for the org its monthly sandbox-hours (403
`quota_exceeded`), and, once billing is switched on for the org (`billing_enabled` on
`/v1/balance`; on for new orgs), its balance (402
`insufficient_credit` unless it is positive) and, for a trial org
(`trial`), the trial limits: it may run one small or default sandbox at a time and hold
20 GiB of disk (403 `trial_limit`), and all trial orgs together may
reserve 8 GiB of host memory at once, overcommitted like the hosts'
(12 GiB at the default `--memory-overcommit` of 1.5; the configured
value is `trial_credit.limits.total_memory_gib` on `/v1/balance`):
a start beyond that is refused with 429
`trial_capacity` and a `Retry-After`, and may pass when retried.
While the host is short of memory, any start is refused with 429
`host_capacity` and a `Retry-After`.
The egress policy defaults to mode `default`.
`secrets` must name existing vault entries (400 otherwise; 503 when
the deployment has no vault key). With `ttl_seconds`, the sandbox
is deleted once it expires (see `expires_at`).

`POST /v1/sandboxes`
