For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
How to Reassign or Unassign Reserved IPs
Last verified 4 Dec 2026
DigitalOcean Reserved IPs are publicly-accessible static IPv4 and IPv6 addresses. Assign and reassign reserved IP addresses to Droplets as needed, or implement an automated failover mechanism with reserved IPs to build a high availability infrastructure.
You can reassign a reserved IP to point it at a different Droplet. You can also unassign it from a Droplet entirely.
# Assign a Reserved IP to a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"assign","droplet_id":8219222}'\
"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions"# Unassign a Reserved IP# curl -X POST \ -H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"unassign"}'\
"https://api.digitalocean.com/v2/reserved_ips/45.55.96.47/actions"
Go
Using Godo, the official DigitalOcean API client for Go:
import("context""os""github.com/digitalocean/godo")funcmain(){token:=os.Getenv("DIGITALOCEAN_TOKEN")client:=godo.NewFromToken(token)ctx:=context.TODO()// Assign a Reserved IP to a Dropletaction,_,err:=client.ReservedIPActions.Assign(ctx,"45.55.96.47",8219222)// Unassign a Reserved IPaction,_,err:=client.ReservedIPActions.Unassign(ctx,"45.55.96.47")}
Ruby
Using DropletKit, the official DigitalOcean API client for Ruby:
require'droplet_kit'token=ENV['DIGITALOCEAN_TOKEN']client=DropletKit::Client.new(access_token:token)# Assign a Reserved IP to a Dropletclient.reserved_ip_actions.assign(ip:'45.55.96.47',droplet_id:8219222)# Unassign a Reserved IP# client.reserved_ip_actions.unassign(ip: '45.55.96.47')
Python
Using PyDo, the official DigitalOcean API client for Python:
# Assign a Reserved IPv6 to a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"assign","droplet_id":8219222}'\
"https://api.digitalocean.com/v2/reserved_ipv6/2409:40d0:f7:1017:74b4:3a96:105e:4c6e/actions"# Unassign a Reserved IPv6 from a Dropletcurl -X POST \
-H "Content-Type: application/json"\
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN"\
-d '{"type":"unassign"}'\
"https://api.digitalocean.com/v2/reserved_ipv6/2409:40d0:f7:1017:74b4:3a96:105e:4c6e/actions"
Go
Using Godo, the official DigitalOcean API client for Go:
import("context""os""github.com/digitalocean/godo")funcmain(){token:=os.Getenv("DIGITALOCEAN_TOKEN")client:=godo.NewFromToken(token)ctx:=context.TODO()// Assign a Reserved IPv6 to a Dropletaction,_,err:=client.ReservedIPV6Actions.Assign(ctx,"2409:40d0:f7:1017:74b4:3a96:105e:4c6e",8219222)// Unassign a Reserved IPv6action,_,err:=client.ReservedIPV6Actions.Unassign(ctx,"2409:40d0:f7:1017:74b4:3a96:105e:4c6e")}
Python
Using PyDo, the official DigitalOcean API client for Python:
To reassign or unassign a reserved IP from the Control Panel, click Networking in the main menu, then click Reserved IPs. This page lists your reserved IPs and their assigned Droplets. Open the … (More) menu of the reserved IP you want to reassign or unassign.
To reassign the IP, click Reassign. In the Reassign Reserved IP window, choose a new Droplet from the Search for a Droplet field, then click Reassign Reserved IP. You can only reassign reserved IPs to Droplets in the same datacenter.
To unassign the IP, click Unassign. In the Unassign Reserved IP window, type the name of the currently assigned Droplet into the confirmation field, then click Unassign Reserved IP.
We can't find any results for your search.
Try using different keywords or simplifying your search terms.