Networking
Attach floating IP to VM
Attach a floating public IP to a virtual machine. Pick one of two modes:
Option A — attach a reserved IP (use ip_id)
Pass ip_id set to a previously reserved IP (from POST /api/v1/ips/reserve or GET /api/v1/ips?reserved=true). The IP must:
- belong to the same account
- not be currently attached to another VM
- have reserved: true
No new billing — you're already paying for the reserved IP.
Option B — auto-assign a new IP (use type)
Leave ip_id empty and pass type to allocate a fresh IP from the pool:
- type: IPv4 (default if omitted)
- type: IPv6
A new IP is allocated and billed to your account from the moment of attach. Detach to release it back to the pool.
Notes
- VM must not already have a public IP of the same family (detach first).
- Optionally pass security_groups (UUID array) to apply security groups to the new NIC.
post/api/v1/vms/{id}/ip
Path parameters
idstring uuid required
VM ID (UUID)
Headers
X-Project-IDstring uuid required
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Request body
Response
IP attached
Example response
{
"success": true
}