---
title: "Update a sandbox"
method: PATCH
path: "/api/v2/sandboxes/boxes/{name}"
tags: ["sandboxes"]
---

# Update a sandbox

`PATCH /api/v2/sandboxes/boxes/{name}`

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v2/sandboxes/boxes/{name}`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-Tenant-Id`
  - HTTP bearer
  - `X-Service-Key` (a scheme the document does not define)

Update a sandbox's display name, retention, resources, tags, or proxy configuration. The name must be unique within the tenant. Proxy configuration sent to a sandbox that is not running is stored and applied when it next starts.

## Path parameters

- `name` string, required

## Request body

- SandboxesUpdateSandboxPayload
  - `cpu_millicores` integer
  - `delete_after_stop_seconds` integer
  - `fs_capacity_bytes` integer
  - `idle_ttl_seconds` integer
  - `mem_bytes` integer: New memory for the sandbox, in bytes. The 4 GiB per vCPU ratio applies when the sandbox is created; a resize enforces only the maximum of 64 GiB.
  - `name` string
  - `proxy_config` SandboxesProxyConfig
    - `access_control` SandboxesAccessControl
      - `allow_list` string[]
      - `deny_list` string[]
    - `callbacks` SandboxesCallback[]
      - `full_request` boolean
      - `match_hosts` string[], required
      - `request_headers` SandboxesProxyHeader[]
        - `is_set` boolean
        - `name` string, required
        - `type` 'plaintext' | 'opaque' | 'workspace_secret', required
        - `value` string
      - `ttl_seconds` integer, required
      - `url` string, required
    - `description` string: Description says what this configuration as a whole lets the sandbox reach, complementing the per-rule descriptions. At most 1024 characters.
    - `no_proxy` string[]
    - `rules` SandboxesProxyRule[] (unresolved $ref)
  - `run_config` SandboxapiRunConfig
    - `env_vars` object
    - `user` string
    - `work_dir` string
  - `tag_value_ids` string[]
  - `vcpus` integer

## Response `200`

OK

- SandboxesSandboxResponse
  - `access_delegation` SandboxesAccessDelegation
    - `mode` 'INHERIT' | 'EXPLICIT', required
    - `permissions` string[]
  - `cpu_millicores` integer
  - `created_at` string
  - `created_by` string
  - `dataplane_url` string
  - `delete_after_stop_seconds` integer
  - `fs_capacity_bytes` integer
  - `id` string
  - `idle_ttl_seconds` integer
  - `labels` SandboxesLabels
  - `mem_bytes` integer
  - `mount_config` SandboxesSandboxMountConfig (unresolved $ref)
  - `name` string
  - `persistent` boolean: Persistent (private beta) reports whether the sandbox keeps its filesystem across stops. When false, its writes are discarded whenever it stops and it is not charged for storage.
  - `preserve_memory_on_stop` boolean
  - `proxy_config` SandboxesProxyConfig
    - `access_control` SandboxesAccessControl
      - `allow_list` string[]
      - `deny_list` string[]
    - `callbacks` SandboxesCallback[]
      - `full_request` boolean
      - `match_hosts` string[], required
      - `request_headers` SandboxesProxyHeader[]
        - `is_set` boolean
        - `name` string, required
        - `type` 'plaintext' | 'opaque' | 'workspace_secret', required
        - `value` string
      - `ttl_seconds` integer, required
      - `url` string, required
    - `description` string: Description says what this configuration as a whole lets the sandbox reach, complementing the per-rule descriptions. At most 1024 characters.
    - `no_proxy` string[]
    - `rules` SandboxesProxyRule[] (unresolved $ref)
  - `run_config` SandboxapiRunConfig
    - `env_vars` object
    - `user` string
    - `work_dir` string
  - `size_class` string
  - `snapshot_id` string
  - `status` string
  - `status_message` string
  - `stopped_at` string
  - `updated_at` string
  - `updated_by` string
  - `vcpus` integer
  - `volumes` SandboxesSandboxVolumeResponse[]: Volumes (beta) are the volumes attached to the sandbox, in slot order. Absent when the workspace does not have sandbox volumes enabled.
    - `mount_path` string
    - `read_only` boolean
    - `volume_id` string
    - `volume_name` string

## Other responses

- `404`: Not Found
- `409`: Name already exists
- `422`: Validation error
- `500`: Internal Server Error

## Changes

- **2026-10-26** `dfe647d1748e`: 4 info
  - added the new optional request property `proxy_config/rules/items/relay_id`
  - added the optional property `persistent` to the response with the `200` status
  - added the optional property `proxy_config/rules/items/relay_id` to the response with the `200` status
  - added the optional property `volumes` to the response with the `200` status
- **2026-10-16** `1a8ee9358d81`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v2/sandboxes/boxes/:name/patch.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/7a01c01f75e8?raw)
