Skip to content

List private networks

GET /api/v2/private-networks

List the private networks in your account. A private network is a /21 range that holds the account’s /24 subnets. VPSes on the same subnet reach each other over private addresses. Each entry counts its subnets and attached VPSes. GET /api/v2/private-networks/{id} lists them. A private network cannot be deleted through the API.

Authentication: An API key with the scope read:network. About keys and scopes

Request

Query parameters

limitinteger
Networks per page, from 1 to 100. Default 20. Default 20. 1 to 100.
cursorstring
The nextCursor value from the previous page.
regionstring
Deprecated. Omit it. Private networks span the whole Hostup network. Another value can return an empty list.

Example

GET /api/v2/private-networks
curl "https://cloud.hostup.se/api/v2/private-networks" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 One page of private networks.

Response 200
{
"data": [
{
"id": "pnet_01hxa3b4c5d6e7f8g9h0j1k2m3",
"name": "production-private",
"parentCidr": "10.201.40.0/21",
"region": "dc1r28",
"status": "active",
"subnetCount": 1,
"attachedVpsCount": 1,
"actions": {
"canAddSubnet": {
"allowed": false,
"reason": "Private network limit reached."
}
},
"createdAt": "2026-04-27T12:00:00.000Z"
}
],
"hasMore": false,
"nextCursor": null
}
Response fields
dataarray of object
idstring
The private network ID (pnet_…).
namestring
Name given when the network was created. parentCidr when it has none.
parentCidrstring
The network’s IPv4 range, a /21. Each subnet is a /24 inside it.
regionstringdeprecated
Deprecated. Location slug of the network. Private networks span the whole Hostup network. You can ignore it.
statusstring
provisioning: being set up on the network. active: ready. deprovisioning: being removed. retired: no longer in use. unknown: the state could not be read. One of provisioning, active, deprovisioning, retired, unknown.
subnetCountinteger
Number of subnets that are not retired.
attachedVpsCountinteger
Number of VPSes with an interface in one of the subnets.
actionsobject
canAddSubnetobject
Whether POST /api/v2/private-networks can add another subnet now. allowed is false with a reason when the subnet quota is full.
allowedboolean
reasonstring or null
Why no subnet can be added. null when allowed is true.
createdAtstring or null
When the network was created.
hasMoreboolean
true when another page follows.
nextCursorstring or null
Cursor for the next page. null on the last page.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400invalid_pagination_limit: limit is not an integer from 1 to 100. invalid_cursor: cursor is not valid.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.