Add a private IP to a server

Add a private IP to a server in one of its private networks. The address starts working a few moments after the response.

POST https://{availability_zone}.betterstackcloud.com/v1/servers/{server_id}/private-ips
server_id string required

The ID of the server to add the address to.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

network_id string required

The ID of the private network the address is in. The server must already be attached to the network.

ip_address string

The private IP address. Must be inside the network's CIDR. Leave it out to get the next free address.

202 Accepted
{
  "id": "example",
  "server_id": "123456789",
  "network_id": "123456789",
  "ip_address": "example",
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z"
}

Returns the newly created server private IP.

id string

The ID of the private IP on the server, a UUID.

server_id string

The ID of the server that has the address.

network_id string

The ID of the private network the address is in.

ip_address string

The private IP address.

created_at datetime

When the address was assigned. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the private IP was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.