POST/v2/droplets/{droplet_id}/actions

Trigger an action on a Droplet

Triggers an action on a specific Droplet, such as rebooting it, changing its size, or creating a snapshot. Supply the action type and any additional fields required for that action; restoring a Droplet requires a backup image of that Droplet. A 201 response includes an action object you can use to track the operation.

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

1 parameter · 1 body field
droplet_idintegerrequired
The unique identifier of the Droplet. Must be at least 1.

Optional JSON action payload. Include the required type and any additional attributes required for that action.

typestringrequired
The type of action to initiate for the Droplet.
Allowed:enable_backupsdisable_backupsrebootpower_cycleshutdownpower_offpower_onrestorepassword_resetresizerebuildrename

6 status codes
201Returns an action object with its identifier, status, type, start and completion times, resource details, and region.
actionobjectoptional
401Returned when authentication 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 indicates that authentication credentials are invalid. A 404 means the droplet_id path parameter does not identify a Droplet; a 429 indicates that the API rate limit has been exceeded, and a 500 indicates a server error. droplet_id must be at least 1, and type must specify a supported action; provide any additional fields required by that action.