dots.v2.droplets.actions.post()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.droplets.actions.post(body: Droplet_action | Droplet_action_snapshot, requestConfiguration?: RequestConfiguration<ActionsRequestBuilderPostQueryParameters>): Promise<undefined | ActionsPostResponse>

Description

Some actions can be performed in bulk on tagged Droplets. The actions can be initiated by sending a POST to /v2/droplets/actions?tag_name=$TAG_NAME with the action arguments.

Only a sub-set of action types are supported:

  • power_cycle
  • power_on
  • power_off
  • shutdown
  • enable_ipv6 (Warning: The Droplet must be powered off before enabling IPv6 on an existing Droplet.)
  • enable_backups
  • disable_backups
  • snapshot (also requires image:create permission)

Parameters

Query Parameters

tagName string optional

Example: env:prod

Used to filter Droplets by a specific tag. Can not be combined with name or type.
Requires tag:read scope.

Request Body

droplet_action

type string required

The type of action to initiate for the Droplet.

One of: enable_backups, disable_backups, reboot, power_cycle, shutdown, power_off, power_on, restore, password_reset, resize, rebuild, rename, change_kernel, enable_ipv6, snapshot

droplet_action_snapshot

type string required

The type of action to initiate for the Droplet.

One of: enable_backups, disable_backups, reboot, power_cycle, shutdown, power_off, power_on, restore, password_reset, resize, rebuild, rename, change_kernel, enable_ipv6, snapshot

name string optional

Example: Nifty New Snapshot

The name to give the new snapshot of the Droplet.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.droplets.actions.post({
    type: "reboot",
});

Response Example

Show Response Example
{
  "actions": [
    {
      "id": 36804636,
      "status": "completed",
      "type": "create",
      "started_at": "2020-11-14T16:29:21Z",
      "completed_at": "2020-11-14T16:30:06Z",
      "resource_id": 3164444,
      "resource_type": "droplet",
      "region_slug": "nyc3"
    }
  ]
}

More Information

See /v2/droplets/actions in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.