# Create a private network in a server's location

`POST https://console.advinservers.com/api/v1/client/servers/{server}/private-networks`

### Overview

Creates a private network in this server's location. Send `name` and optionally a private `subnet`. Attach the server separately after creation.

### Permissions

Requires the `network.update` (Change networking) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `server` (string, required): The server uuid short

## Body

Sent as `application/json`.

- `name` (string, required): The name shown to customers. 1 to 64 characters. Must match `^[\w\-. ]+$`
- `subnet` (string | null): The value of `subnet`.

## Response 200

The record, as a JSON object. There is no envelope.

- `id` (string, required): The id ID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `name` (string, required): The name shown to customers.
- `subnet` (string | null, required): The range members are addressed out of, and below, the address each one holds on it.
- `location` (string | null, required): The network's city name, shared by locations in the same city. Used in the account-wide network list.
- `attached` (boolean, required): Whether the requested server is attached to this network.
- `attachment_status` (string | null, required): The requested server's attachment status, or null when it is not attached. One of: `attaching`, `attached`, `detaching`, `null`.
- `members` (object[], required): The value of `members`.
  - `server_id` (string | null, required): The server id ID.
  - `uuid_short` (string | null, required): The value of `uuid_short`.
  - `name` (string | null, required): The name shown to customers.
  - `hostname` (string | null, required): The fully qualified hostname.
  - `template_name` (string | null, required): Enough to draw the machine the way every other list of servers draws it, and withheld with the name for the same reason.
  - `template_icon_url` (string | null, required): The value of `template_icon_url`.
  - `windows` (boolean, required): The value of `windows`.
  - `nic_index` (integer | null, required): The value of `nic_index`.
  - `ip_address` (string | null, required): The value of `ip_address`.
  - `status` (string, required): The value of `status`. One of: `attaching`, `attached`, `detaching`.
  - `is_current` (boolean, required): Whether this is the requested server.
- `created_at` (string | null, required): The date and time for created at, in UTC.

```json
{
  "id": "5220f263-0e8e-4917-bf4f-4cae109ca4c5",
  "uuid_short": "Uuid short",
  "name": "Lambda Complex staging",
  "subnet": "10.24.1.0/24",
  "location": "Kansas City, MO",
  "attached": false,
  "attachment_status": null,
  "members": [],
  "created_at": "2026-09-14T16:42:09+00:00"
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `422`: A field is missing or invalid, or the resource cannot accept this change in its current state. Check `message` for details. Field validation also includes an `errors` object keyed by field name.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/private-networks' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Lambda Complex staging",
  "subnet": "10.24.1.0/24"
}'
```
