> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update tunnel configuration

> Apply a new tunnel configuration on the fly. The existing tunnel is torn down and a new one is established. This endpoint is write-only; there is no corresponding GET to read the config back.



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /network/tunnel/config
openapi: 3.0.0
info:
  contact: {}
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  version: 0.0.1
servers:
  - url: https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run
    variables:
      sandbox_id:
        default: unknown
      workspace_id:
        default: unknown
      region:
        default: unknown
security:
  - BearerAuth: []
paths:
  /network/tunnel/config:
    put:
      tags:
        - network
      summary: Update tunnel configuration
      description: >-
        Apply a new tunnel configuration on the fly. The existing tunnel is torn
        down and a new one is established. This endpoint is write-only; there is
        no corresponding GET to read the config back.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunnelConfigRequest'
        description: Base64-encoded tunnel configuration
        required: true
      responses:
        '200':
          description: Configuration applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid tunnel configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to apply configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TunnelConfigRequest:
      properties:
        config:
          description: Base64-encoded tunnel config JSON
          example: eyJsb2NhbF9pcCI6ICIxMC4wLjAuMS8zMiIsIC4uLn0=
          type: string
      required:
        - config
      type: object
    SuccessResponse:
      properties:
        message:
          example: File created successfully
          type: string
        path:
          example: /path/to/file
          type: string
      required:
        - message
      type: object
    ErrorResponse:
      properties:
        error:
          example: Error message
          type: string
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````