dots.v2.reserved_ips.post()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.reserved_ips.post(body: Reserved_ip_createMember1 | Reserved_ip_createMember2, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Reserved_ipsPostResponse>

Description

On creation, a reserved IP must be either assigned to a Droplet or reserved to a region.

  • To create a new reserved IP assigned to a Droplet, send a POST request to /v2/reserved_ips with the droplet_id attribute.

  • To create a new reserved IP reserved to a region, send a POST request to /v2/reserved_ips with the region attribute.

Parameters

body object required
Show child properties
dropletId integer optional

Example: 2457247

The ID of the Droplet that the reserved IP will be assigned to.

region string optional

Example: nyc3

The slug identifier for the region the reserved IP will be reserved to.

projectId string optional

Example: 746c6152-2fa2-11ed-92d3-27aaa54e4988

The UUID of the project to which the reserved IP will be assigned.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.reserved_ips.post({
    dropletId: 2457247,
});

Response Example

Show Response Example
{
  "reserved_ip": {
    "ip": "45.55.96.47",
    "droplet": null,
    "region": {
      "name": "New York 3",
      "slug": "nyc3",
      "features": [
        "private_networking",
        "backups",
        "ipv6",
        "metadata",
        "install_agent",
        "storage",
        "image_transfer"
      ],
      "available": true,
      "sizes": [
        "s-1vcpu-1gb",
        "s-1vcpu-2gb",
        "s-1vcpu-3gb",
        "s-2vcpu-2gb",
        "s-3vcpu-1gb",
        "s-2vcpu-4gb",
        "s-4vcpu-8gb",
        "s-6vcpu-16gb",
        "s-8vcpu-32gb",
        "s-12vcpu-48gb",
        "s-16vcpu-64gb",
        "s-20vcpu-96gb",
        "s-24vcpu-128gb",
        "s-32vcpu-192g"
      ]
    },
    "locked": true,
    "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988"
  },
  "links": {
    "droplets": [
      {
        "id": 213939433,
        "rel": "droplet",
        "href": "https://api.digitalocean.com/v2/droplets/213939433"
      }
    ],
    "actions": [
      {
        "id": 1088924622,
        "rel": "assign_ip",
        "href": "https://api.digitalocean.com/v2/actions/1088924622"
      }
    ]
  }
}

More Information

See /v2/reserved_ips in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.