---
title: "Create your private network: a WireGuard tunnel from your own network into your sandboxes."
method: POST
path: "/v1/networks/wireguard"
tags: ["networks"]
---

# Create your private network: a WireGuard tunnel from your own network into your sandboxes.

`POST /v1/networks/wireguard`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/networks/wireguard`
- Auth: HTTP bearer

One per organization. Every sandbox gets an address in the subnet (default 10.250.0.0/16; choose one your network does not use). Then add a peer for each of your machines or routers. Needs a kept top-up. Calling it again returns the network you have.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `subnet` string: A private IPv4 range from /16 to /24. Default 10.250.0.0/16.

## Response `200`

Success

- object
  - `funded` boolean: Funding permits traffic. False disables traffic while retaining the reservation; check balance, spending limits and account permissions.
  - `fundedUntil` string, date-time, nullable: Last funded-through timestamp, possibly in the past. Null means no meter exists. Free IPv6 also receives renewable deadlines.
  - `rateMicros` integer: Immutable quoted monthly price in millionths of a US dollar.
  - `rateUnit` 'unit_month'
  - `id` string
  - `subnet` string
  - `gatewayAddress` string
  - `endpoint` string: Where peers send WireGuard: address:udpPort.
  - `gatewayPublicKey` string, nullable: Null until a funded gateway is ready.
  - `disabled` boolean
  - `peers` object[]
    - `id` string
    - `name` string
    - `publicKey` string
    - `address` string: The peer's address inside the private network.
    - `routes` string[]: Your own ranges behind this peer, which sandboxes may reach through it.
    - `createdAt` string, date-time
    - `rotatedAt` string, date-time, nullable
  - `sandboxes` object[]
    - `sandboxId` string
    - `name` string, nullable
    - `address` string: Reach this sandbox's ports at this address.
    - `state` string
  - `createdAt` string, date-time

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
