---
title: "Initiate a Droplet Action"
method: POST
path: "/v2/droplets/{droplet_id}/actions"
tags: ["DigitalOcean-public.v2-new_Droplet Actions"]
---

# Initiate a Droplet Action

`POST /v2/droplets/{droplet_id}/actions`

To initiate an action on a Droplet send a POST request to
`/v2/droplets/$DROPLET_ID/actions`. In the JSON body to the request,
set the `type` attribute to on of the supported action types:

| Action                                   | Details | Additionally Required Permission |
| ---------------------------------------- | ----------- | ----------- |
| <nobr>`enable_backups`</nobr>            | Enables backups for a Droplet | |
| <nobr>`disable_backups`</nobr>           | Disables backups for a Droplet | |
| <nobr>`change_backup_policy`</nobr>      | Update the backup policy for a Droplet | |
| <nobr>`reboot`</nobr>                    | Reboots a Droplet. A `reboot` action is an attempt to reboot the Droplet in a graceful way, similar to using the `reboot` command from the console. | |
| <nobr>`power_cycle`</nobr>               | Power cycles a Droplet. A `powercycle` action is similar to pushing the reset button on a physical machine, it's similar to booting from scratch. | |
| <nobr>`shutdown`</nobr>                  | Shutsdown a Droplet. A shutdown action is an attempt to shutdown the Droplet in a graceful way, similar to using the `shutdown` command from the console. Since a `shutdown` command can fail, this action guarantees that the command is issued, not that it succeeds. The preferred way to turn off a Droplet is to attempt a shutdown, with a reasonable timeout, followed by a `power_off` action to ensure the Droplet is off. | |
| <nobr>`power_off`</nobr>                 | Powers off a Droplet. A `power_off` event is a hard shutdown and should only be used if the `shutdown` action is not successful. It is similar to cutting the power on a server and could lead to complications. | |
| <nobr>`power_on`</nobr>                  | Powers on a Droplet. | |
| <nobr>`restore`</nobr>                   | Restore a Droplet using a backup image. The image ID that is passed in must be a backup of the current Droplet instance. The operation will leave any embedded SSH keys intact. | droplet:admin |
| <nobr>`password_reset`</nobr>            | Resets the root password for a Droplet. A new password will be provided via email. It must be changed after first use. | droplet:admin |
| <nobr>`resize`</nobr>                    | Resizes a Droplet. Set the `size` attribute to a size slug. If a permanent resize with disk changes included is desired, set the `disk` attribute to `true`. | droplet:create |
| <nobr>`rebuild`</nobr>                   | Rebuilds a Droplet from a new base image. Set the `image` attribute to an image ID or slug. | droplet:admin |
| <nobr>`rename`</nobr>                    | Renames a Droplet. | |
| <nobr>`change_kernel`</nobr>             | Changes a Droplet's kernel. Only applies to Droplets with externally managed kernels. All Droplets created after March 2017 use internal kernels by default. | |
| <nobr>`enable_ipv6`</nobr>               | Enables IPv6 for a Droplet. Once enabled for a Droplet, IPv6 can not be disabled. When enabling IPv6 on an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/#on-existing-droplets) is required. | |
| <nobr>`snapshot`</nobr>                  | Takes a snapshot of a Droplet. | image:create |

## Path parameters

- `droplet_id` integer, required

## Request body

- union
  - DropletAction — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
  - DropletActionEnableBackups — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `backup_policy` object — An object specifying the backup policy for the Droplet. If omitted, the backup plan will default to daily.
      - `plan` 'daily' | 'weekly' — The backup plan used for the Droplet. The plan can be either `daily` or `weekly`.
      - `weekday` 'SUN' | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' — The day of the week on which the backup will occur.
      - `hour` 0 | 4 | 8 | 12 | 16 | 20 — The hour of the day that the backup window will start.
      - `window_length_hours` integer — The length of the backup window starting from `hour`.
      - `retention_period_days` integer — The number of days the backup will be retained.
  - DropletActionChangeBackupPolicy — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `backup_policy` object, required — An object specifying the backup policy for the Droplet.
      - `plan` 'daily' | 'weekly' — The backup plan used for the Droplet. The plan can be either `daily` or `weekly`.
      - `weekday` 'SUN' | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' — The day of the week on which the backup will occur.
      - `hour` 0 | 4 | 8 | 12 | 16 | 20 — The hour of the day that the backup window will start.
      - `window_length_hours` integer — The length of the backup window starting from `hour`.
      - `retention_period_days` integer — The number of days the backup will be retained.
  - DropletActionRestore — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `image` integer — The ID of a backup of the current Droplet instance to restore from.
  - DropletActionResize — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `disk` boolean — When `true`, the Droplet's disk will be resized in addition to its RAM and CPU. This is a permanent change and cannot be reversed as a Droplet's disk size cannot be decreased.
    - `size` string — The slug identifier for the size to which you wish to resize the Droplet.
  - DropletActionRebuild — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `image` union — The image ID of a public or private image or the slug identifier for a public image. The Droplet will be rebuilt using this image as its base.
      - string
      - integer
  - DropletActionRename — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `name` string — The new name for the Droplet.
  - DropletActionChangeKernel — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `kernel` integer — A unique number used to identify and reference a specific kernel.
  - DropletActionSnapshot — Specifies the action that will be taken on the Droplet.
    - `type` 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot', required — The type of action to initiate for the Droplet.
    - `name` string — The name to give the new snapshot of the Droplet.

## Response `201`

The response will be a JSON object with a key called `action`.

- object
  - `action` Action
    - `id` integer — A unique numeric ID that can be used to identify and reference an action.
    - `status` 'in-progress' | 'completed' | 'errored' — The current status of the action. This can be "in-progress", "completed", or "errored".
    - `type` string — This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action.
    - `started_at` string, date-time — A time value given in ISO8601 combined date and time format that represents when the action was initiated.
    - `completed_at` string, date-time, nullable — A time value given in ISO8601 combined date and time format that represents when the action was completed.
    - `resource_id` integer, nullable — A unique identifier for the resource that the action is associated with.
    - `resource_type` string — The type of resource that the action is associated with.
    - `region` Region
      - `name` string, required — The display name of the region. This will be a full name that is used in the control panel and other interfaces.
      - `slug` string, required — A human-readable string that is used as a unique identifier for each region.
      - `features` string[], required — This attribute is set to an array which contains features available in this region
      - `available` boolean, required — This is a boolean value that represents whether new Droplets can be created in this region.
      - `sizes` string[], required — This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view.
    - `region_slug` string, nullable — A human-readable string that is used as a unique identifier for each region.

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/revisions/cb3bf9b21459/schema)
