Skip to content
  • Auto
  • Light
  • Dark

Update

Update an Image
put/v2/images/{image_id}

To update an image, send a PUT request to /v2/images/$IMAGE_ID. Set the name attribute to the new value you would like to use. For custom images, the description and distribution attributes may also be updated.

Path ParametersExpand Collapse
image_id: number
Body ParametersExpand Collapse
description: optional string

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

distribution: optional "Arch Linux" or "CentOS" or "CoreOS" or 10 more

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.

Accepts one of the following:
"Arch Linux"
"CentOS"
"CoreOS"
"Debian"
"Fedora"
"Fedora Atomic"
"FreeBSD"
"Gentoo"
"openSUSE"
"RancherOS"
"Rocky Linux"
"Ubuntu"
"Unknown"
name: optional string

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.

ReturnsExpand Collapse
image: Image
curl https://api.digitalocean.com/v2/images/$IMAGE_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" \
    -d '{
          "description": " ",
          "distribution": "Ubuntu",
          "name": "Nifty New Snapshot"
        }'
{
  "image": {
    "created_at": "2020-05-04T22:23:02Z",
    "description": " ",
    "distribution": "Ubuntu",
    "error_message": " ",
    "min_disk_size": 20,
    "name": "Nifty New Snapshot",
    "public": true,
    "regions": [
      "nyc1",
      "nyc2"
    ],
    "size_gigabytes": 2.34,
    "slug": "nifty1",
    "status": "NEW",
    "tags": [
      "base-image",
      "prod"
    ],
    "type": "snapshot"
  }
}
Returns Examples
{
  "image": {
    "created_at": "2020-05-04T22:23:02Z",
    "description": " ",
    "distribution": "Ubuntu",
    "error_message": " ",
    "min_disk_size": 20,
    "name": "Nifty New Snapshot",
    "public": true,
    "regions": [
      "nyc1",
      "nyc2"
    ],
    "size_gigabytes": 2.34,
    "slug": "nifty1",
    "status": "NEW",
    "tags": [
      "base-image",
      "prod"
    ],
    "type": "snapshot"
  }
}