# Create a sandbox

Launch stage: Beta

`POST /api/2.0/sandboxes`

Creates a new Sandbox.

API scopes: sandbox

## Query parameters

- `sandbox_id` (string, required)
  Client-supplied ID that becomes the final path segment of the resource name.

## Request body

The sandbox to create.
- `spec` (object, optional)
  The desired configuration of the sandbox, supplied by the caller at creation time.
  - `compute` (object, optional)
    Compute configuration (size, inactivity timeout) requested for the sandbox.
    - `inactivity_timeout` (string, optional)
      Idle duration after which the sandbox is automatically terminated.
- `name` (string, optional, ID, Immutable)
  The sandbox resource name, in the form `sandboxes/{sandbox_id}`. Derived from
   `sandbox_id`; any value supplied in a create or update request body is ignored.
- `display_name` (string, optional)
  Human-readable display label for the sandbox. At most 256 characters.

## Returns

Returns the Sandbox object.

## Response

```json
{
  "spec": {
    "compute": {}
  },
  "status": {
    "state": "SANDBOX_STATE_PENDING"
  },
  "name": "string",
  "create_time": "string",
  "update_time": "string",
  "display_name": "string"
}
```

