POST /v2/images

To create a new custom image, send a POST request to /v2/images. The body must contain a url attribute pointing to a Linux virtual machine image to be imported into DigitalOcean. The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
distribution String No

The name of a custom image's distribution. Currently, the valid values are Arch Linux, CentOS, CoreOS, Debian, Fedora, Fedora Atomic, FreeBSD, Gentoo, openSUSE, RancherOS, Rocky Linux, Ubuntu, and Unknown. Any other value will be accepted but ignored, and Unknown will be used in its place.

Possible values:

  • "Ubuntu"
  • "Rocky Linux"
  • "FreeBSD"
  • "Fedora"
  • "CentOS"
  • "Arch Linux"
  • "Debian"
  • "CoreOS"
  • "Fedora Atomic"
  • "RancherOS"
  • "openSUSE"
  • "Unknown"
  • "Gentoo"
region String Yes

The slug identifier for the region where the resource will initially be available.

Possible values:

  • "sfo3"
  • "sfo1"
  • "sgp1"
  • "sfo2"
  • "blr1"
  • "nyc1"
  • "nyc2"
  • "nyc3"
  • "lon1"
  • "fra1"
  • "ams1"
  • "ams3"
  • "ams2"
  • "syd1"
  • "tor1"
name String Yes

The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.

description String No

An optional free-form text field to describe an image.

url String Yes

A URL from which the custom Linux virtual machine image may be retrieved. The image it points to must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.

tags[] Array No

A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.