pydo.droplets.create()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.droplets.create(
body={
"name": "example.com",
"region": "nyc3",
"size": "s-1vcpu-1gb",
...,
},
)Description
To create a new Droplet, send a POST request to /v2/droplets setting the
required attributes.
A Droplet will be created using the provided information. The response body
will contain a JSON object with a key called droplet. The value will be an
object containing the standard attributes for your new Droplet. The response
code, 202 Accepted, does not indicate the success or failure of the operation,
just that the request has been accepted for processing. The actions returned
as part of the response’s links object can be used to check the status
of the Droplet create event.
Create Multiple Droplets
Creating multiple Droplets is very similar to creating a single Droplet.
Instead of sending name as a string, send names as an array of strings. A
Droplet will be created for each name you send using the associated
information. Up to ten Droplets may be created this way at a time.
Rather than returning a single Droplet, the response body will contain a JSON
array with a key called droplets. This will be set to an array of JSON
objects, each of which will contain the standard Droplet attributes. The
response code, 202 Accepted, does not indicate the success or failure of any
operation, just that the request has been accepted for processing. The array
of actions returned as part of the response’s links object can be used to
check the status of each individual Droplet create event.
Parameters
namestring optionalExample:
example.comThe human-readable string you wish to use when displaying the Droplet name. The name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. The name set during creation will also determine the hostname for the Droplet in its internal configuration.
regionstring optionalExample:
nyc3The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g.
nyc) can be used to deploy the Droplet in any of the that region's locations (nyc1,nyc2, ornyc3). If the region is omitted from the create request completely, the Droplet may deploy in any region.sizestring requiredExample:
s-1vcpu-1gbThe slug identifier for the size that you wish to select for this Droplet.
imageobject requiredExample:
ubuntu-20-04-x64The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet.
Requiresimage:readscope.ssh_keysarray of objects optionalExample:
[289794, '3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45']An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. You must add the keys to your team before they can be embedded on a Droplet.
Requiresssh_key:readscope.backupsboolean optionalExample:
TrueA boolean indicating whether automated backups should be enabled for the Droplet.
backup_policyobject optionalShow child properties
planstring optionalThe backup plan used for the Droplet. The plan can be either
dailyorweekly.weekdaystring optionalThe day of the week on which the backup will occur.
hourinteger optionalThe hour of the day that the backup window will start.
window_length_hoursinteger optional read-onlyExample:
4The length of the backup window starting from
hour.retention_period_daysinteger optional read-onlyExample:
7The number of days the backup will be retained.
ipv6boolean optionalExample:
TrueA boolean indicating whether to enable IPv6 on the Droplet.
monitoringboolean optionalExample:
TrueA boolean indicating whether to install the DigitalOcean agent for monitoring.
tagsarray of strings or null optionalExample:
['env:prod', 'web']A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags.
Requirestag:createscope.user_datastring optionalExample:
#cloud-config runcmd: - touch /test.txtA string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size.
private_networkingboolean optional deprecatedExample:
TrueThis parameter has been deprecated. Use
vpc_uuidinstead to specify a VPC network for the Droplet. If novpc_uuidis provided, the Droplet will be placed in your account's default VPC for the region.volumesarray of strings optionalExample:
['12e97116-7280-11ed-b3d0-0a58ac146812']An array of IDs for block storage volumes that will be attached to the Droplet once created. The volumes must not already be attached to an existing Droplet.
Requiresblock_storage:readscpoe.vpc_uuidstring optionalExample:
760e09ef-dc84-11e8-981e-3cfdfeaae000A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region.
Requiresvpc:readscope.with_droplet_agentboolean optionalExample:
TrueA boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to
false. To make installation errors fatal, explicitly set it totrue.public_networkingboolean optionalExample:
TrueAn optional boolean indicating whether this Droplet should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to
false, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set tofalse,ipv6must also befalse.namesarray of strings optionalExample:
['sub-01.example.com', 'sub-02.example.com']An array of human human-readable strings you wish to use when displaying the Droplet name. Each name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. Each name set during creation will also determine the hostname for the Droplet in its internal configuration.
Request Sample
Response Example
More Information
See /v2/droplets in the API reference for additional detail on responses, headers, parameters, and more.