---
title: "PUT /sandboxes/{sandboxID}/network"
method: PUT
path: "/sandboxes/{sandboxID}/network"
tags: ["sandboxes"]
---

# PUT /sandboxes/{sandboxID}/network

`PUT /sandboxes/{sandboxID}/network`

Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.

## Path parameters

- `sandboxID` string, required

## Request body

- SandboxNetworkUpdateConfig — Network configuration update for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting a field clears it.
  - `allowOut` string[] — List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com", "*.example.com"). Allowed entries always take precedence over denied entries.
  - `denyOut` string[] — List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.
  - `rules` object — Per-domain transform rules. Replaces all existing rules when provided.
  - `allow_internet_access` boolean — Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config.

## Response `204`

Successfully updated the sandbox network configuration

## Other responses

- `401` — Authentication error
- `404` — Not found
- `409` — Conflict
- `500` — Server error

## Changes

- **2026-05-27** `e13ef89d456c` — 1 info
  - the endpoint scheme security `AuthProviderBearerAuth AND AuthProviderTeamAuth` was added to the API
- **2026-05-26** `6c40e6f50bad` — 1 info
  - endpoint added
- **2023-11-15** `897ba2f1c7b6` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/e2b-dev/apis/e2b-api/changes/sandboxes/:sandboxID/network/put.md)

---

[API](https://skmtc.dev/e2b-dev/apis/e2b-api.md) · [All operations](https://skmtc.dev/e2b-dev/apis/e2b-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/e2b-dev/e2b-api/revisions/edf2d2943a24/schema)
