Digital Ocean Volumes API

The Volumes API from Digital Ocean — 7 operation(s) for volumes.

GitHub OpenAPI

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/volumes List block storage volumes · Get volumes #
Ask an LLM
“Which block storage volumes do I have?”
“Can I see all my volumes in one list?”
Tell an agent
List my block storage volumes.
Show every volume attached to my account.
POST /v2/volumes Create a block storage volume · Create volumes #
Ask an LLM
“How do I attach an extra block storage volume to a droplet?”
“Can I create a new volume for my droplet?”
Tell an agent
Create a new block storage volume.
Add a volume for my droplet.
DELETE /v2/volumes Delete a block storage volume · Delete volumes #
Ask an LLM
“How do I detach and delete a volume I no longer need?”
“Can I remove a block storage volume by its ID?”
Tell an agent destructive · confirm first
Delete a block storage volume.
Detach and remove a volume from my account.
POST /v2/volumes/actions Perform an action on a volume · Create volumes actions #
Ask an LLM
“Can I detach a volume from a droplet with an action?”
“What actions can I run on a volume?”
Tell an agent
Run a volume action.
Detach a volume from its droplet using an action.
GET /v2/volumes/snapshots/{snapshot_id} Get a volume snapshot · Get volumes snapshots by snapshot id #
Ask an LLM
“How do I look up a volume snapshot by its ID?”
“What does a specific volume snapshot contain?”
Tell an agent
Get volume snapshot {snapshot_id}.
Show the details of volume snapshot {snapshot_id}.
DELETE /v2/volumes/snapshots/{snapshot_id} Delete a volume snapshot · Delete volumes snapshots by snapshot id #
Ask an LLM
“How do I delete a volume snapshot?”
“Can I remove a snapshot of a volume?”
Tell an agent destructive · confirm first
Delete volume snapshot {snapshot_id}.
Remove the snapshot {snapshot_id} of a volume.
GET /v2/volumes/{volume_id} Get a block storage volume · Get volumes by volume id #
Ask an LLM
“How do I check the status of one volume?”
“Can I see the details of a single volume by ID?”
Tell an agent
Get volume {volume_id}.
Show the status of volume {volume_id}.
DELETE /v2/volumes/{volume_id} Detach and delete a volume · Delete volumes by volume id #
Ask an LLM
“How do I detach a volume from a droplet and delete it?”
“Can I remove a volume by ID?”
Tell an agent destructive · confirm first
Delete volume {volume_id}.
Detach and remove volume {volume_id} from its droplet.
GET /v2/volumes/{volume_id}/actions List actions on a volume · Get volumes by volume id actions #
Ask an LLM
“What actions have been run on a volume?”
“Can I see the action history for one volume?”
Tell an agent
List actions on volume {volume_id}.
Show the action history of volume {volume_id}.
POST /v2/volumes/{volume_id}/actions Run an action on a volume · Create volumes by volume id actions #
Ask an LLM
“How do I detach a volume from a droplet?”
“Can I attach a volume to a droplet with an action?”
Tell an agent
Run an action on volume {volume_id}.
Detach volume {volume_id} from its droplet.
GET /v2/volumes/{volume_id}/actions/{action_id} Get an action on a volume · Get volumes by volume id actions by action id #
Ask an LLM
“How do I check whether a volume action has finished?”
“Can I see one action on a volume by its ID?”
Tell an agent
Get action {action_id} on volume {volume_id}.
Check the status of action {action_id} on volume {volume_id}.
GET /v2/volumes/{volume_id}/snapshots List snapshots of a volume · Get volumes by volume id snapshots #
Ask an LLM
“Which snapshots exist for a volume?”
“Can I list the snapshots of one volume?”
Tell an agent
List snapshots of volume {volume_id}.
Show every snapshot taken of volume {volume_id}.
POST /v2/volumes/{volume_id}/snapshots Take a snapshot of a volume · Create volumes by volume id snapshots #
Ask an LLM
“How do I take a snapshot of a volume?”
“Can I create a snapshot of a volume before I detach it?”
Tell an agent
Take a snapshot of volume {volume_id}.
Create a snapshot of volume {volume_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/digital-ocean:digital-ocean-volumes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

digital-ocean-volumes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DigitalOcean Volumes API
  version: '2.0'
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: DigitalOcean API Team
    email: api-engineering@digitalocean.com
  termsOfService: https://www.digitalocean.com/legal/terms-of-service-agreement/
servers:
- url: https://api.digitalocean.com
  description: production
security:
- bearer_auth: []
tags:
- name: Volumes
paths:
  /v2/volumes:
    get:
      $ref: resources/volumes/volumes_list.yml
      tags:
      - Volumes
      summary: Get volumes
      x-summary-source: derived
      operationId: getV2Volumes
      x-operation-id-source: derived
    post:
      $ref: resources/volumes/volumes_create.yml
      tags:
      - Volumes
      summary: Create volumes
      x-summary-source: derived
      operationId: postV2Volumes
      x-operation-id-source: derived
    delete:
      $ref: resources/volumes/volumes_delete_byName.yml
      tags:
      - Volumes
      summary: Delete volumes
      x-summary-source: derived
      operationId: deleteV2Volumes
      x-operation-id-source: derived
  /v2/volumes/actions:
    post:
      $ref: resources/volumes/volumeActions_post.yml
      tags:
      - Volumes
      summary: Create volumes actions
      x-summary-source: derived
      operationId: postV2VolumesActions
      x-operation-id-source: derived
  /v2/volumes/snapshots/{snapshot_id}:
    get:
      $ref: resources/volumes/volumeSnapshots_get_byId.yml
      tags:
      - Volumes
      summary: Get volumes snapshots by snapshot id
      x-summary-source: derived
      operationId: getV2VolumesSnapshotsBySnapshotId
      x-operation-id-source: derived
    delete:
      $ref: resources/volumes/volumeSnapshots_delete_byId.yml
      tags:
      - Volumes
      summary: Delete volumes snapshots by snapshot id
      x-summary-source: derived
      operationId: deleteV2VolumesSnapshotsBySnapshotId
      x-operation-id-source: derived
  /v2/volumes/{volume_id}:
    get:
      $ref: resources/volumes/volumes_get.yml
      tags:
      - Volumes
      summary: Get volumes by volume id
      x-summary-source: derived
      operationId: getV2VolumesByVolumeId
      x-operation-id-source: derived
    delete:
      $ref: resources/volumes/volumes_delete.yml
      tags:
      - Volumes
      summary: Delete volumes by volume id
      x-summary-source: derived
      operationId: deleteV2VolumesByVolumeId
      x-operation-id-source: derived
  /v2/volumes/{volume_id}/actions:
    get:
      $ref: resources/volumes/volumeActions_list.yml
      tags:
      - Volumes
      summary: Get volumes by volume id actions
      x-summary-source: derived
      operationId: getV2VolumesByVolumeIdActions
      x-operation-id-source: derived
    post:
      $ref: resources/volumes/volumeActions_post_byId.yml
      tags:
      - Volumes
      summary: Create volumes by volume id actions
      x-summary-source: derived
      operationId: postV2VolumesByVolumeIdActions
      x-operation-id-source: derived
  /v2/volumes/{volume_id}/actions/{action_id}:
    get:
      $ref: resources/volumes/volumeActions_get.yml
      tags:
      - Volumes
      summary: Get volumes by volume id actions by action id
      x-summary-source: derived
      operationId: getV2VolumesByVolumeIdActionsByActionId
      x-operation-id-source: derived
  /v2/volumes/{volume_id}/snapshots:
    get:
      $ref: resources/volumes/volumeSnapshots_list.yml
      tags:
      - Volumes
      summary: Get volumes by volume id snapshots
      x-summary-source: derived
      operationId: getV2VolumesByVolumeIdSnapshots
      x-operation-id-source: derived
    post:
      $ref: resources/volumes/volumeSnapshots_create.yml
      tags:
      - Volumes
      summary: Create volumes by volume id snapshots
      x-summary-source: derived
      operationId: postV2VolumesByVolumeIdSnapshots
      x-operation-id-source: derived
components:
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: '## OAuth Authentication


        In order to interact with the DigitalOcean API, you or your application must

        authenticate.


        The DigitalOcean API handles this through OAuth, an open standard for

        authorization. OAuth allows you to delegate access to your account.

        Scopes can be used to grant full access, read-only access, or access to

        a specific set of endpoints.


        You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)

        section of the DigitalOcean control panel for your account.


        An OAuth token functions as a complete authentication request. In effect, it

        acts as a substitute for a username and password pair.


        Because of this, it is absolutely **essential** that you keep your OAuth

        tokens secure. In fact, upon generation, the web interface will only display

        each token a single time in order to prevent the token from being compromised.


        DigitalOcean access tokens begin with an identifiable prefix in order to

        distinguish them from other similar tokens.


        - `dop_v1_` for personal access tokens generated in the control panel

        - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)

        - `dor_v1_` for OAuth refresh tokens


        ### Scopes


        Scopes act like permissions assigned to an API token. These permissions

        determine what actions the token can perform. You can create API

        tokens that grant read-only access, full access, or limited access to

        specific endpoints by using custom scopes.


        Generally, scopes are designed to match HTTP verbs and common CRUD

        operations (Create, Read, Update, Delete).


        | HTTP Verb | CRUD Operation | Scope |

        |---|---|---|

        | GET | Read | `<resource>:read` |

        | POST | Create | `<resource>:create` |

        | PUT/PATCH | Update | `<resource>:update` |

        | DELETE | Delete | `<resource>:delete` |


        For example, creating a new Droplet by making a `POST` request to the

        `/v2/droplets` endpoint requires the `droplet:create` scope while

        listing Droplets by making a `GET` request to the `/v2/droplets`

        endpoint requires the `droplet:read` scope.


        Each endpoint below specifies which scope is required to access it when

        using custom scopes.


        ### How to Authenticate with OAuth


        In order to make an authenticated request, include a bearer-type

        `Authorization` header containing your OAuth token. All requests must be

        made over HTTPS.


        ### Authenticate with a Bearer Authorization Header


        ```

        curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT"

        ```

        '
    inference_bearer_auth:
      type: http
      scheme: bearer
      description: '## OAuth Authentication


        In order to interact with the DigitalOcean API, you or your application must

        authenticate.


        The DigitalOcean API handles this through OAuth, an open standard for

        authorization. OAuth allows you to delegate access to your account.

        Scopes can be used to grant full access, read-only access, or access to

        a specific set of endpoints.


        You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)

        section of the DigitalOcean control panel for your account.


        An OAuth token functions as a complete authentication request. In effect, it

        acts as a substitute for a username and password pair.


        Because of this, it is absolutely **essential** that you keep your OAuth

        tokens secure. In fact, upon generation, the web interface will only display

        each token a single time in order to prevent the token from being compromised.


        DigitalOcean access tokens begin with an identifiable prefix in order to

        distinguish them from other similar tokens.


        - `dop_v1_` for personal access tokens generated in the control panel

        - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)

        - `dor_v1_` for OAuth refresh tokens


        ### Authenticate with a Bearer Authorization Header


        **Serverless Inference:**


        ```

        curl -X POST -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://inference.do-ai.run/v1/chat/completions"

        ```


        **Agent Inference:**


        ```

        curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true"

        ```


        **Note:** Agent Inference APIs use an `agent_access_key` (endpoint access

        key) instead of a DigitalOcean OAuth token. The `agent_access_key` is

        provided when you provision an agent endpoint and is scoped to that

        specific agent. It is not interchangeable with DigitalOcean OAuth tokens

        (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`), which are used with Serverless

        Inference and the control-plane API at `https://api.digitalocean.com`.

        '
x-tagGroups:
- name: Public APIs
  tags:
  - Public APIs Introduction
  - 1-Click Applications
  - Account
  - Actions
  - Add-Ons
  - Action Gateway
  - Action Gateway Data Plane
  - Agent Platform API
  - Apps
  - Billing
  - Block Storage
  - Block Storage Actions
  - BYOIP Prefixes
  - CDN Endpoints
  - Certificates
  - Container Registry
  - Container Registries
  - Databases
  - Dedicated Inference
  - Domain Records
  - Domains
  - Droplet Actions
  - Droplets
  - Droplet Autoscale Pools
  - Firewalls
  - Floating IP Actions
  - Floating IPs
  - Functions
  - Harness Runtime
  - Image Actions
  - Images
  - Insights
  - Kubernetes
  - Load Balancers
  - MicroVMs [Public Preview]
  - Monitoring
  - NFS
  - NFS Actions
  - Organizations
  - Partner Network Connect
  - Project Resources
  - Projects
  - Regions
  - Reserved IP Actions
  - Reserved IPs
  - Reserved IPv6
  - Reserved IPv6 Actions
  - Security
  - Signals
  - Sizes
  - Snapshots
  - Spaces Keys
  - SSH Keys
  - Tags
  - Uptime
  - Vector Databases
  - VPC NAT Gateways
  - VPC Peerings
  - VPC Routes [Public Preview]
  - VPC Subnets [Public Preview]
  - VPCs
- name: Inference APIs
  tags:
  - Inference Introduction
  - Agent Inference
  - Batch Inference
  - Embeddings
  - Serverless Inference