Skip to content

Attach a server to a private network

POST/servers/{server}/private-networks/{privateNetwork}/attach

Overview

Attaches a server to the private network. Optionally send ip_address; otherwise, the lowest available address is assigned. The member list includes the assigned address immediately. Network configuration runs in the background, with status attaching until complete. Poll the network to check progress. The server and network must share the same account and location.

Permissions

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

curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/private-networks/{privateNetwork}/attach' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "ip_address": "10.24.0.10"
}'
{
  "id": "5220f263-0e8e-4917-bf4f-4cae109ca4c5",
  "uuid_short": "Uuid short",
  "name": "Sector C backbone",
  "subnet": "10.24.0.0/24",
  "location": "Kansas City, MO",
  "attached": true,
  "attachment_status": "attaching",
  "members": [
    {
      "server_id": "ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
      "uuid_short": "ecc6f4f1",
      "name": "lambda-core",
      "hostname": "lambda-core.blackmesa.example.com",
      "template_name": "Ubuntu 24.04",
      "template_icon_url": "/assets/icons/ubuntu.png",
      "windows": false,
      "nic_index": null,
      "ip_address": "10.24.0.10",
      "status": "attaching",
      "is_current": true
    },
    {
      "server_id": "304e1794-a5b7-41f2-9a20-c0d444eb6683",
      "uuid_short": "304e1794",
      "name": "sector-c-db",
      "hostname": "sector-c-db.blackmesa.example.com",
      "template_name": "Debian 13",
      "template_icon_url": "/assets/icons/debian.png",
      "windows": false,
      "nic_index": 1,
      "ip_address": "10.24.0.11",
      "status": "attached",
      "is_current": false
    }
  ],
  "created_at": "2026-05-11T09:20:47+00:00"
}

Authorization

Authorizationstringheaderrequired

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.

Send it as Bearer <token>.

Path parameters

serverstringrequired

The server uuid short

privateNetworkstringrequired

The private network uuid short

Body

application/json
ip_addressstring | null

The value of ip_address.

Response 200

application/json

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

idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

subnetstring | nullrequired

The range members are addressed out of, and below, the address each one holds on it.

locationstring | nullrequired

The network's city name, shared by locations in the same city. Used in the account-wide network list.

attachedbooleanrequired

Whether the requested server is attached to this network.

attachment_statusstring | nullrequired

The requested server's attachment status, or null when it is not attached.

One of: attaching, attached, detaching, null

membersobject[]required

The value of members.

Show child attributes
server_idstring | nullrequired

The server id ID.

uuid_shortstring | nullrequired

The value of uuid_short.

namestring | nullrequired

The name shown to customers.

hostnamestring | nullrequired

The fully qualified hostname.

template_namestring | nullrequired

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_urlstring | nullrequired

The value of template_icon_url.

windowsbooleanrequired

The value of windows.

nic_indexinteger | nullrequired

The value of nic_index.

ip_addressstring | nullrequired

The value of ip_address.

statusstringrequired

The value of status.

One of: attaching, attached, detaching

is_currentbooleanrequired

Whether this is the requested server.

created_atstring | nullrequired

The date and time for created at, in UTC.

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.