Digital Ocean Account API
Provides information about your current account.
Provides information about your current account.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/digital-ocean-account-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: DigitalOcean Account API
version: '2.0'
description: '# Introduction
The DigitalOcean API allows you to manage Droplets and resources within the
DigitalOcean cloud in a simple, programmatic way using conventional HTTP requests.'
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: Account
description: Provides information about your current account.
paths:
/v2/account:
get:
operationId: account_get
summary: Get User Information
description: To show information about the current user account, send a GET request to `/v2/account`.
tags:
- Account
responses:
'200':
$ref: '#/components/responses/account'
'401':
$ref: '#/components/responses/unauthorized'
'429':
$ref: '#/components/responses/too_many_requests'
'500':
$ref: '#/components/responses/server_error'
default:
$ref: '#/components/responses/unexpected_error'
x-codeSamples:
- lang: cURL
source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/account\""
- lang: Python
source: 'import os
from pydo import Client
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))
account_info = client.account.get()'
security:
- bearer_auth:
- account:read
components:
schemas:
account:
type: object
properties:
droplet_limit:
description: The total number of Droplets current user or team may have active at one time.
type: integer
example: 25
floating_ip_limit:
description: The total number of Floating IPs the current user or team may have.
type: integer
example: 5
email:
description: The email address used by the current user to register for DigitalOcean.
type: string
example: sammy@digitalocean.com
name:
description: The display name for the current user.
type: string
example: Sammy the Shark
uuid:
description: The unique universal identifier for the current user.
type: string
example: b6fr89dbf6d9156cace5f3c78dc9851d957381ef
email_verified:
description: If true, the user has verified their account via email. False otherwise.
type: boolean
default: false
example: true
status:
description: This value is one of "active", "warning" or "locked".
type: string
enum:
- active
- warning
- locked
default: active
example: active
status_message:
description: A human-readable message giving more details about the status of the account.
type: string
example: ' '
team:
type: object
description: When authorized in a team context, includes information about the current team.
properties:
uuid:
description: The unique universal identifier for the current team.
type: string
example: 5df3e3004a17e242b7c20ca6c9fc25b701a47ece
name:
description: The name for the current team.
type: string
example: My Team
required:
- droplet_limit
- floating_ip_limit
- email
- uuid
- email_verified
- status
- status_message
error:
type: object
properties:
id:
description: A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
type: string
example: not_found
message:
description: A message providing additional information about the error, including details to help resolve it when possible.
type: string
example: The resource you were accessing could not be found.
request_id:
description: Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
type: string
example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9
required:
- id
- message
responses:
unauthorized:
description: Unauthorized
headers:
ratelimit-limit:
$ref: '#/components/headers/ratelimit-limit'
ratelimit-remaining:
$ref: '#/components/headers/ratelimit-remaining'
ratelimit-reset:
$ref: '#/components/headers/ratelimit-reset'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
id: unauthorized
message: Unable to authenticate you.
unexpected_error:
description: Unexpected error
headers:
ratelimit-limit:
$ref: '#/components/headers/ratelimit-limit'
ratelimit-remaining:
$ref: '#/components/headers/ratelimit-remaining'
ratelimit-reset:
$ref: '#/components/headers/ratelimit-reset'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
id: example_error
message: some error message
too_many_requests:
description: API Rate limit exceeded
headers:
ratelimit-limit:
$ref: '#/components/headers/ratelimit-limit'
ratelimit-remaining:
$ref: '#/components/headers/ratelimit-remaining'
ratelimit-reset:
$ref: '#/components/headers/ratelimit-reset'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
id: too_many_requests
message: API Rate limit exceeded.
account:
description: A JSON object keyed on account with an excerpt of the current user account data.
headers:
ratelimit-limit:
$ref: '#/components/headers/ratelimit-limit'
ratelimit-remaining:
$ref: '#/components/headers/ratelimit-remaining'
ratelimit-reset:
$ref: '#/components/headers/ratelimit-reset'
content:
application/json:
schema:
properties:
account:
$ref: '#/components/schemas/account'
server_error:
description: Server error.
headers:
ratelimit-limit:
$ref: '#/components/headers/ratelimit-limit'
ratelimit-remaining:
$ref: '#/components/headers/ratelimit-remaining'
ratelimit-reset:
$ref: '#/components/headers/ratelimit-reset'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
id: server_error
message: Unexpected server-side error
headers:
ratelimit-limit:
schema:
type: integer
example: 5000
description: The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-reset:
schema:
type: integer
example: 1444931833
description: The time when the oldest request will expire. The value is given in Unix epoch time. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire.
ratelimit-remaining:
schema:
type: integer
example: 4816
description: The number of requests in your hourly quota that remain before you hit your request limit. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire.
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"
```
'