v12

latestOpenAPI 3.0.3raw.githubusercontent.com2026-06-1811583196.1 KB
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

ip_idstring uuid

ID of a previously reserved IP. The IP must belong to the same account, be reserved, and not already attached to another VM. No new billing — you're already paying for the reserved IP.

type'IPv4' | 'IPv6'

IP family to auto-allocate. Used only when ip_id is omitted. Defaults to IPv4. A new IP is allocated from the pool and billed to your account from the moment of attach.

security_groupsstring[]

Security group IDs (UUIDs) to apply to the new NIC.

Response

IP attached

successboolean required
messagestring

Example response

{
  "success": true
}