POST
/v2/volumes/{volume_id}/actionsTrigger a block storage volume action by ID
Triggers an attach, detach, or resize action on a block storage volume identified by ID. Set type to the action to perform and provide the corresponding Droplet or size details, along with the volume's region. Use page and per_page to paginate the results.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
volume_idstringrequired
The UUID of the block storage volume to act on.
per_pageintegeroptional
Number of items to return per page. Must be between 1 and 200. Defaults to 20 when omitted.
pageintegeroptional
Page number to return. Must be at least 1. Defaults to 1 when omitted.
Details for an attach, detach, or resize action on the block storage volume.
typestringrequired
The volume action to initiate.
regionstringoptional
The slug identifier for the region where the resource will initially be available.
droplet_idintegerrequired
The unique identifier for the Droplet the volume will be attached or detached from.
tagsarray<string>optional
A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. <br><br>Requires `tag:create` scope.
202Returns an object with an `action` property containing the standard volume 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 requested 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; a 404 is returned when the volume or target resource is not found; a 429 is returned when the API rate limit is exceeded; and a 500 is returned when a server error occurs. The volume_id path parameter must be a UUID identifying the volume. type must identify an attach, detach, or resize action; resize actions must increase the volume size and cannot exceed 16 TiB.