Skip to main content
POST
/
external
/
api
/
v1
/
flexcompute
/
reserve
Reserve Capacity
curl --request POST \
  --url https://public-api.cloudidr.com/external/api/v1/flexcompute/reserve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "014876987943",
  "zoneId": "usw2-az1",
  "policyName": "Volod test policy",
  "instanceType": "c5.large",
  "platform": "Linux/UNIX",
  "startDate": "01/10/2026",
  "endDate": "01/12/2026",
  "startTime": "00:00",
  "endTime": "23:15",
  "utcOffsetHours": "-8",
  "quantity": 2
}
'
{
  "myPolicy": {
    "cidrId": "sc_830349911839",
    "policyName": "Volod test policy",
    "cspAccountName": "personal AWS",
    "policyStatus": "READY_FOR_PURCHASE",
    "policyOperatingState": "IDLE",
    "policyInstance": {
      "id": 1688,
      "instanceType": "c5.large",
      "platformCode": "Linux/UNIX",
      "tenancyCode": "DEDICATED",
      "vcpu": 2,
      "memory": 4,
      "gpu": 0,
      "gpuMemory": 0,
      "qty": 2
    },
    "cspRegion": {
      "regionCode": "us-west-2",
      "regionType": "PRIMARY",
      "availabilityZoneId": "usw2-az1"
    },
    "createdDate": "2026-01-08T15:20:15.64868Z",
    "capacityConfiguration": {
      "launchDateTime": "2026-01-10T00:00:00-08:00",
      "endDateTime": "2026-01-12T23:15:00-08:00",
      "autoRenewalEnabled": false,
      "frequency": null,
      "vpc": "default",
      "securityGroups": "none",
      "amiImage": "default",
      "sshPairKey": "none",
      "ebsVolumeSize": 10
    },
    "pricing": {
      "ourPrice": 8.48,
      "cspProviderPrice": 12.11,
      "savings": 3.63,
      "savingsPercentage": 0.3,
      "creditCardProcessingFee": 0.55,
      "bankAccountProcessingFee": 0.07
    }
  },
  "capacityAvailable": true,
  "alternativeQtyRecommendations": [],
  "alternativeTimeRecommendations": [],
  "alternativeTypeRecommendations": []
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
accountId
string
required

AWS account ID

policyName
string
required

Name to assign to the reservation policy

instanceType
string
required

EC2 instance type to check (e.g., c5.large)

platform
string
default:Linux/UNIX
required

OS/platform for the offering (e.g., Linux/UNIX, Windows Server)

zoneId
string
required

Availability Zone identifier to search within (e.g., usw2-az1, aps1-az1)

quantity
integer
required

Number of instances to reserve (must be positive)

Required range: x >= 1
startDate
string
required

Reservation start date, format MM/dd/yyyy (e.g., 12/20/2024)

Pattern: ^\d{2}/\d{2}/\d{4}$
endDate
string
required

Reservation end date, format MM/dd/yyyy (e.g., 12/25/2024)

Pattern: ^\d{2}/\d{2}/\d{4}$
startTime
string
required

Reservation start time, format HH:mm (24-hour, e.g., 09:30)

Pattern: ^\d{2}:\d{2}$
endTime
string
required

Reservation end time, format HH:mm (24-hour, e.g., 23:15)

Pattern: ^\d{2}:\d{2}$
utcOffsetHours
string
required

Client UTC offset in hours (range -18 to 18)

autoRenewalEnabled
boolean
default:false

Enables auto-renewal for the policy

autoRenewalFrequency
enum<string>

Auto-renewal frequency (required when autoRenewalEnabled is true)

Available options:
one-day,
one-week,
one-month

Response

Success - Reservation was successful