curl --request POST \
--url https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server": "304e1794"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach"
payload = { "server": "304e1794" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({server: '304e1794'})
};
fetch('https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'server' => '304e1794'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach"
payload := strings.NewReader("{\n \"server\": \"304e1794\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server\": \"304e1794\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"server\": \"304e1794\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "1b8349e5-3568-43e0-bf89-fc3350dd7a08",
"uuid_short": "1b8349e5",
"status": "active",
"status_label": "Active",
"progress_message": null,
"needs_funds": false,
"type": "ipv4",
"address": "198.51.100.42",
"cidr": 24,
"gateway": "198.51.100.1",
"onlink": null,
"is_primary": false,
"location": "Kansas City, MO",
"location_id": 3,
"is_granted": false,
"can_release": false,
"billing": {
"service_id": 7421,
"invoice_id": 17214,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "3.00",
"currency": "USD",
"billing_cycle": "monthly",
"payment_due_at": null,
"payment_window_minutes": null,
"paid_at": "2026-06-20T14:03:58+00:00"
},
"can_cancel_checkout": false,
"can_request_cancellation": true,
"can_withdraw_cancellation": false,
"cancellation_type": null,
"cancellation_requested_at": null,
"created_at": "2026-06-20T14:03:51+00:00",
"server": {
"id": "304e1794",
"name": "sector-c-db",
"hostname": "sector-c-db.blackmesa.example.com",
"windows": false,
"template_name": "Debian 13",
"template_icon_url": "https://img.icons8.com/color/48/debian.png"
},
"attaching_to": null,
"attachment_status": null
}{
"message": "The request could not be carried out."
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Attach a floating IP to a server
Overview
Attaches the floating IP to a server and removes its previous assignment. Send server using an ID from the eligible server list. The server must be in the address’s location. Configure the IP inside the server’s operating system after attaching it.
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/floating-ips/{floatingIp}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server": "304e1794"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach"
payload = { "server": "304e1794" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({server: '304e1794'})
};
fetch('https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'server' => '304e1794'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach"
payload := strings.NewReader("{\n \"server\": \"304e1794\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server\": \"304e1794\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/floating-ips/{floatingIp}/attach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"server\": \"304e1794\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "1b8349e5-3568-43e0-bf89-fc3350dd7a08",
"uuid_short": "1b8349e5",
"status": "active",
"status_label": "Active",
"progress_message": null,
"needs_funds": false,
"type": "ipv4",
"address": "198.51.100.42",
"cidr": 24,
"gateway": "198.51.100.1",
"onlink": null,
"is_primary": false,
"location": "Kansas City, MO",
"location_id": 3,
"is_granted": false,
"can_release": false,
"billing": {
"service_id": 7421,
"invoice_id": 17214,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "3.00",
"currency": "USD",
"billing_cycle": "monthly",
"payment_due_at": null,
"payment_window_minutes": null,
"paid_at": "2026-06-20T14:03:58+00:00"
},
"can_cancel_checkout": false,
"can_request_cancellation": true,
"can_withdraw_cancellation": false,
"cancellation_type": null,
"cancellation_requested_at": null,
"created_at": "2026-06-20T14:03:51+00:00",
"server": {
"id": "304e1794",
"name": "sector-c-db",
"hostname": "sector-c-db.blackmesa.example.com",
"windows": false,
"template_name": "Debian 13",
"template_icon_url": "https://img.icons8.com/color/48/debian.png"
},
"attaching_to": null,
"attachment_status": null
}{
"message": "The request could not be carried out."
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
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
The floating ip uuid short
"1b8349e5-3568-43e0-bf89-fc3350dd7a08"
Body
Send a JSON object containing the fields below. Required fields are marked in the schema.
The value of server.
36Response
The record, as a JSON object. There is no envelope.
A floating IP address and its current assignment.
The uuid UUID.
"1b8349e5-3568-43e0-bf89-fc3350dd7a08"
The first eight characters of the UUID. Either form can identify the address.
"1b8349e5"
The value of status.
pending_payment, active, pending_cancellation, deleting, expired, cancelled, payment_review "active"
The value of status_label.
"Active"
One sentence about why a purchase is waiting, or null.
null
Whether the purchase is waiting on account credit, which is the one wait the customer can end themselves.
false
The type of operation or resource.
ipv4, ipv6 "ipv4"
The IP address, or null after it has been released.
"198.51.100.42"
The network prefix length.
24
The gateway address for the network.
"198.51.100.1"
The value of onlink.
null
Whether the resource is primary.
false
The value of location.
"Kansas City, MO"
The location id ID.
3
Whether the resource is granted.
false
Whether the customer can release.
false
The value of billing.
Show child attributes
Show child attributes
{
"service_id": 7421,
"invoice_id": 17214,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "3.00",
"currency": "USD",
"billing_cycle": "monthly",
"payment_due_at": null,
"payment_window_minutes": null,
"paid_at": "2026-06-20T14:03:58+00:00"
}
Whether the customer can cancel checkout.
false
Whether the customer can request cancellation.
true
Whether the cancellation standing against this address can still be taken back. False for an immediate one, which gave the address away as it was filed.
false
The value of cancellation_type.
immediate, end_of_billing, null null
The date and time for cancellation requested at, in UTC.
null
The date and time for created at, in UTC.
"2026-06-20T14:03:51+00:00"
Null whenever the address is held but parked on nothing, which is a perfectly ordinary state for a floating address to sit in.
Show child attributes
Show child attributes
{
"id": "ecc6f4f1",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"windows": false,
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png"
}
The server this address was bought for, while it waits to be put there. It is attached as soon as the purchase has been paid for, and this goes back to null.
Show child attributes
Show child attributes
null
Which way the address is moving while a worker attaches or detaches it, or null once it has settled. An attaching address is not on attaching_to yet; a detaching one is still on server.
attaching, detaching, null null