API Overview

DigitalOcean has four APIs that let you programmatically manage and interact with various products and parts of the platform.

DigitalOcean API

The DigitalOcean API lets you programmatically manage Droplets and other DigitalOcean resources using conventional HTTP requests.

Complete reference documentation for the DigitalOcean API, including request samples in cURL, Python, Go, and Ruby.
Create a personal access token for use with the DigitalOcean API.
Try the DigitalOcean API from your browser with Swagger UI’s Try-It-Now functionality.

Spaces API

Spaces provides a RESTful XML API for programmatically managing the data you store through standard HTTP requests. The API is interoperable with Amazon’s AWS S3 API, allowing you to interact with the service with any S3-compatible tools.

Complete reference documentation for the Spaces RESTful XML API, which is interoperable with Amazon’s AWS S3 API.
Allow people or programs to co-manage Spaces with the owner of the Spaces bucket using access keys or DigitalOcean Teams.
The Spaces API is inter-operable with the AWS S3 API, meaning you can use existing S3 tools and libraries with it. These examples demonstrate how to perform a number of common Spaces operations in JavaScript, Go, PHP, Python 3, and Ruby.

OAuth API

The OAuth API is a secure method for authenticating users and allowing third-party applications limited access to your servers or DigitalOcean user accounts.

Complete reference documentation for the OAuth API, including application registration and troubleshooting.

Metadata API

The metadata API allows a Droplet to access information about itself including user data, Droplet ID, datacenter region, and IP addresses. Droplets can access the metadata service using the static, link-local IP address 169.254.169.254.

Complete reference documentation for the Metadata API for Droplets.
Use the Droplet metadata service to programmatically query a Droplet for information about itself.

Latest Updates

22 April 2024

  • We’ve corrected a bug where image types other than snapshots could be listed using the GET /v2/snapshots endpoint. This behavior was strictly limited to image types that the user was properly authorized to access, such as backups and custom images.

17 April 2024

  • Custom scopes for personal access tokens (PATs) are now generally available.

    Previously, DigitalOcean PATs had only two scopes: read access to all team resources or full (read and write) access to all team resources. Custom scopes introduce more specific permissions, like creating Droplets or updating cloud firewalls, which lets you secure your workflows by granting only the permissions the token needs and restricting access to other resources and actions.

12 April 2024

  • Team members with the biller role can no longer access information about shared resources. Previously, billers could access this information via the API, but not the control panel.

For more information, see the full release notes.