POST/v2/floating_ips/{floating_ip}/actions

Initiate a floating IP action

Triggers an assignment or unassignment action on a floating IP. Set type to assign or unassign; include droplet_id when assigning the floating IP to a Droplet. The response contains the action object for tracking the operation.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
floating_ipstringrequired
The floating IP address to act on, in IPv4 format.

The action to perform on the floating IP. Set type to assign or unassign, and provide droplet_id when assigning it to a Droplet.

typestringrequired
The type of action to initiate for the floating IP.
Allowed:assignunassign

6 status codes
201Returns an `action` object containing the standard floating IP action attributes.
actionobjectoptional
401Returned when authentication fails because the credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the floating IP resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned when authentication fails because the credentials are invalid; a 404 means the floating IP resource was not found; a 429 indicates the API rate limit was exceeded; and a 500 indicates a server error. The floating_ip path parameter must be a valid IPv4 address. The body must include type set to assign or unassign; include droplet_id for an assignment.