> ## Documentation Index
> Fetch the complete documentation index at: https://e2b-mintlify-changelog-1774264263.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Put sandboxes network

> Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting both fields clears all egress rules.



## OpenAPI

````yaml /openapi-public.yml put /sandboxes/{sandboxID}/network
openapi: 3.1.0
info:
  title: E2B API
  version: 0.1.0
  description: >-
    Complete E2B developer API. Platform endpoints are served on api.e2b.app.
    Sandbox endpoints (envd) are served on {port}-{sandboxID}.e2b.app.
servers:
  - url: https://api.e2b.app
    description: E2B Platform API
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
paths:
  /sandboxes/{sandboxID}/network:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    put:
      tags:
        - Sandboxes
      description: >-
        Update the network configuration for a running sandbox. Replaces the
        current egress rules with the provided configuration. Omitting both
        fields clears all egress rules.
      operationId: putSandboxNetwork
      parameters:
        - $ref: '#/components/parameters/sandboxID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                allowOut:
                  type: array
                  description: >-
                    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.
                  items:
                    type: string
                denyOut:
                  type: array
                  description: >-
                    List of denied CIDR blocks or IP addresses for egress
                    traffic. Domain names are not supported for deny rules.
                  items:
                    type: string
      responses:
        '204':
          description: Successfully updated the sandbox network configuration
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    sandboxID:
      name: sandboxID
      in: path
      required: true
      schema:
        type: string
  responses:
    '401':
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '409':
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````