curl --request POST \
--url https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server": "ecc6f4f1"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/attach"
payload = { "server": "ecc6f4f1" }
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: 'ecc6f4f1'})
};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/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/bandwidth-blocks/{bandwidthBlock}/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' => 'ecc6f4f1'
]),
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/bandwidth-blocks/{bandwidthBlock}/attach"
payload := strings.NewReader("{\n \"server\": \"ecc6f4f1\"\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/bandwidth-blocks/{bandwidthBlock}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server\": \"ecc6f4f1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/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\": \"ecc6f4f1\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "23653478-238e-4db3-b263-91a221b5e7c2",
"region": "us_eu",
"region_label": "Americas & EMEA",
"size": 2199023255552,
"consumed": 549755813888,
"remaining": 1649267441664,
"terabytes": 2,
"status": "active",
"status_label": "Active",
"progress_message": null,
"needs_funds": false,
"assignment": "servers",
"servers": [
{
"id": "304e1794",
"uuid": "304e1794-a5b7-41f2-9a20-c0d444eb6683",
"name": "sector-c-db",
"hostname": "sector-c-db.blackmesa.example.com",
"template_name": "Debian 13",
"template_icon_url": "https://img.icons8.com/color/48/debian.png",
"windows": false,
"address": "203.0.113.57",
"location": "Kansas City, MO"
},
{
"id": "ecc6f4f1",
"uuid": "ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png",
"windows": false,
"address": "203.0.113.24",
"location": "Kansas City, MO"
}
],
"servers_in_other_teams": 0,
"attachable_servers": 0,
"location": null,
"unit_price": "1.00",
"billing": {
"service_id": null,
"invoice_id": 17853,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "2.00",
"currency": "USD",
"billing_cycle": null,
"payment_due_at": null,
"payment_window_minutes": 30,
"paid_at": "2026-08-20T11:26:19+00:00"
},
"can_cancel": true,
"created_at": "2026-08-20T11:26:14+00:00",
"cancellation_refund": "1.50",
"refund_amount": null,
"refund_pending": false,
"notice": "This block was feeding the Kansas City, MO pool. Attaching it to a server has taken it out of that pool."
}{
"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."
}Assign a bandwidth block to a server
Overview
Assigns a bandwidth block to a server. Send server using a short ID from the eligibility endpoint. The extra bandwidth applies immediately and removes bandwidth throttling. A block can cover individual servers or a location pool. If it was assigned to a pool, it is removed from that pool and the response includes a notice. A block with no transfer left on it cannot be assigned.
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/bandwidth-blocks/{bandwidthBlock}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server": "ecc6f4f1"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/attach"
payload = { "server": "ecc6f4f1" }
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: 'ecc6f4f1'})
};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/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/bandwidth-blocks/{bandwidthBlock}/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' => 'ecc6f4f1'
]),
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/bandwidth-blocks/{bandwidthBlock}/attach"
payload := strings.NewReader("{\n \"server\": \"ecc6f4f1\"\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/bandwidth-blocks/{bandwidthBlock}/attach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"server\": \"ecc6f4f1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/{bandwidthBlock}/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\": \"ecc6f4f1\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "23653478-238e-4db3-b263-91a221b5e7c2",
"region": "us_eu",
"region_label": "Americas & EMEA",
"size": 2199023255552,
"consumed": 549755813888,
"remaining": 1649267441664,
"terabytes": 2,
"status": "active",
"status_label": "Active",
"progress_message": null,
"needs_funds": false,
"assignment": "servers",
"servers": [
{
"id": "304e1794",
"uuid": "304e1794-a5b7-41f2-9a20-c0d444eb6683",
"name": "sector-c-db",
"hostname": "sector-c-db.blackmesa.example.com",
"template_name": "Debian 13",
"template_icon_url": "https://img.icons8.com/color/48/debian.png",
"windows": false,
"address": "203.0.113.57",
"location": "Kansas City, MO"
},
{
"id": "ecc6f4f1",
"uuid": "ecc6f4f1-c89b-4dce-a20b-a330641c5b0b",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png",
"windows": false,
"address": "203.0.113.24",
"location": "Kansas City, MO"
}
],
"servers_in_other_teams": 0,
"attachable_servers": 0,
"location": null,
"unit_price": "1.00",
"billing": {
"service_id": null,
"invoice_id": 17853,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "2.00",
"currency": "USD",
"billing_cycle": null,
"payment_due_at": null,
"payment_window_minutes": 30,
"paid_at": "2026-08-20T11:26:19+00:00"
},
"can_cancel": true,
"created_at": "2026-08-20T11:26:14+00:00",
"cancellation_refund": "1.50",
"refund_amount": null,
"refund_pending": false,
"notice": "This block was feeding the Kansas City, MO pool. Attaching it to a server has taken it out of that pool."
}{
"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 bandwidth block UUID
"23653478-238e-4db3-b263-91a221b5e7c2"
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 purchased or granted bandwidth allowance.
The uuid UUID.
"23653478-238e-4db3-b263-91a221b5e7c2"
The value of region.
us_eu, apac "us_eu"
The value of region_label.
"Americas & EMEA"
The value of size.
2199023255552
The value of consumed.
549755813888
The value of remaining.
1649267441664
The value of terabytes.
2
The value of status.
pending_payment, active, expired, cancelled, payment_review, revoked "active"
The value of status_label.
"Active"
One sentence about why a purchase is waiting, most often how much the account is short by. Null once there is nothing to say.
null
Whether the purchase is waiting for enough account credit.
false
Whether the block is assigned to individual servers or a city.
"servers"
The value of servers.
Show child attributes
Show child attributes
[
{
"id": "304e1794",
"uuid": "304e1794-a5b7-41f2-9a20-c0d444eb6683",
"name": "sector-c-db",
"hostname": "sector-c-db.blackmesa.example.com",
"template_name": "Debian 13",
"template_icon_url": "https://img.icons8.com/color/48/debian.png",
"windows": false,
"address": "203.0.113.57",
"location": "Kansas City, MO"
}
]
The rest of what it covers, counted rather than named. Nought for the account holder, who is shown every one of them, and for anyone else not standing inside a single team.
0
How many of the account's servers this block could still be put behind: metered, in the region it was bought for, and not already covered by it. Null where it was not counted, which is not the same as none.
1
The value of location.
Show child attributes
Show child attributes
null
The value of unit_price.
"1.00"
The value of billing.
Show child attributes
Show child attributes
{
"service_id": null,
"invoice_id": 17853,
"invoice_url": null,
"checkout_uuid": null,
"invoice_status": "Paid",
"amount": "2.00",
"currency": "USD",
"billing_cycle": null,
"payment_due_at": null,
"payment_window_minutes": 30,
"paid_at": "2026-08-20T11:26:19+00:00"
}
Whether the customer can cancel.
true
The date and time for created at, in UTC.
"2026-08-20T11:26:14+00:00"
The value of cancellation_refund.
"1.50"
The value of refund_amount.
null
The value of refund_pending.
false
Explains the coverage changed by this request.
"This block was feeding the Kansas City, MO pool. Attaching it to a server has taken it out of that pool."