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
limitintegerNetworks per page, from 1 to 100. Default 20. Default
20. 1 to 100.cursorstringThe
nextCursor value from the previous page.regionstringDeprecated. Omit it. Private networks span the whole Hostup network. Another value can return an empty list.
Example
curl "https://cloud.hostup.se/api/v2/private-networks" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 One page of private networks.
{ "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 objectidstringThe private network ID (
pnet_…).namestringName given when the network was created.
parentCidr when it has none.parentCidrstringThe network’s IPv4 range, a /21. Each subnet is a /24 inside it.
regionstringdeprecatedDeprecated. Location slug of the network. Private networks span the whole Hostup network. You can ignore it.
statusstringprovisioning: 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.subnetCountintegerNumber of subnets that are not retired.
attachedVpsCountintegerNumber of VPSes with an interface in one of the subnets.
actionsobjectcanAddSubnetobjectWhether
POST /api/v2/private-networks can add another subnet now. allowed is false with a reason when the subnet quota is full.allowedbooleanreasonstring or nullWhy no subnet can be added.
null when allowed is true.createdAtstring or nullWhen the network was created.
hasMorebooleantrue when another page follows.nextCursorstring or nullCursor 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.
| 400 | invalid_pagination_limit: limit is not an integer from 1 to 100. invalid_cursor: cursor is not valid. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |