Skip to main content

Quick start

Base URL: https://cloud-api.adaptgroup.pro. Create a Cloud API integration in the dashboard, copy its numeric ID and secret key, and top up its balance before purchases. Examples use illustrative IDs and prices; obtain actual values from the catalog.

Authentication and request format​

Every request requires X-Api-Key and api_key_id. Use the method and parameter location shown on each route:

  • GET and DELETE: identifiers and filters in the path/query, no JSON body.
  • POST/PATCH/PUT with a documented body: Content-Type: application/json and api_key_id in JSON.
  • POST console link and PUT saved IPv4 attachment: api_key_id in query, no JSON body.
  • Paid purchases, renewals and VPS commands require Idempotency-Key where shown. Quotes and auto-renewal settings do not.

Keep the key on your backend. api_user_id is your customer's string identifier, not the integration ID. Only resources belonging to the authenticated integration are accessible.

curl 'https://cloud-api.adaptgroup.pro/balance?api_key_id=1' \
--header 'X-Api-Key: YOUR_API_KEY'
{
"success": true,
"api_key_id": 1,
"balance": "100.0000",
"currency": "USD",
"balance_updated_at": "2026-09-28T12:00:00"
}

Amounts are decimal strings in USD; use decimal arithmetic. Times are UTC; some database timestamps may omit the timezone suffix. Send integer fields as JSON numbers, booleans as true/false. Unknown JSON fields are rejected. Response shapes differ: balance, VPS plans and OS use top-level fields, while most resource routes use data. List routes with pagination include total_count.

Choose a VPS and calculate its price​

  1. List VPS plans: choose location_id, platform and plan_code. Prices include the integration markup. available=null means availability is unknown; a catalog view does not reserve capacity.
  2. List operating systems: select os_id.
  3. Calculate the purchase. This does not charge or reserve a VPS, and does not require a sufficient balance.
curl --request POST 'https://cloud-api.adaptgroup.pro/vms/quote' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"api_key_id": 1,
"api_user_id": "customer-123",
"location_id": 1,
"platform": "ryzen",
"plan_code": "C1",
"os_id": 1,
"password": "Example-Password-2026!",
"cpu_percent": 60,
"months": 1,
"auto_renew": false
}'
{
"success": true,
"data": {
"amount_usd": "5.0000",
"balance_usd": "100.0000",
"currency": "USD",
"months": 1,
"discount_percent": "0"
}
}

Creation and its quote require exactly one of password or ssh_public_key. Send a public OpenSSH key itself, not ssh_key_id. CPU share defaults to 60; supported values are 20/40/60/80/100. Terms are 1/3/6/12/24/36 calendar months. auto_renew defaults to false.

Confirm and track the purchase​

Send the same body to POST /vms, optionally adding expected_amount_usd from the quote, and add a unique Idempotency-Key. For example:

curl --request POST 'https://cloud-api.adaptgroup.pro/vms' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Idempotency-Key: customer-123-vps-20260928-001' \
--header 'Content-Type: application/json' \
--data '{
"api_key_id": 1,
"api_user_id": "customer-123",
"location_id": 1,
"platform": "ryzen",
"plan_code": "C1",
"os_id": 1,
"password": "Example-Password-2026!",
"expected_amount_usd": "5.0000"
}'

The example price must be replaced with your actual quote. HTTP 202 means accepted, not provisioned:

{
"success": true,
"data": {
"order_id": 401,
"status": "pending",
"amount_usd": "5.0000",
"currency": "USD",
"vm_id": null,
"rental_id": null,
"error_code": null,
"error_message": null
}
}

Save order_id. Use Order details or Webhooks to learn the result. Once complete, use vm_id with VPS details. Power/firewall/reinstall commands instead return an operation in data; its id is an operation_id, not an order ID.

Retries and price confirmation​

Use a distinct Idempotency-Key for each intended action: 1–200 printable ASCII characters without spaces. After a timeout or uncertain response, repeat the same method, path, parameters and key. A new key can create a second paid purchase. Reusing a key with changed parameters produces a conflict.

expected_amount_usd is optional. Without it, the current calculated price is charged. With it, a mismatch returns 409 price_changed before charging; on a resize the value is a maximum because the remaining-term surcharge can decrease. After a confirmed price refusal, obtain a new quote and submit the newly confirmed action with a new key. Extra traffic can also be tied to expected_period_id from its quote.

Errors​

HTTPMeaning
200Result returned; inspect its fields
202Accepted for asynchronous processing; inspect order/operation status
401Missing/invalid key, mismatched integration ID, or inactive integration
404Resource not found in this integration
409Business/state conflict: insufficient funds, changed price, reused key, busy resource or stale firewall revision
422Invalid or unsupported request parameters
500Unexpected server error
503Service unavailable or operation result unconfirmed

detail can be a string, a structured object, or a validation error array. Do not parse human-readable messages as stable codes. Documentation language does not change API messages.

{
"detail": {
"code": "insufficient_balance",
"message": "Недостаточно средств"
}
}
{
"detail": [
{
"type": "greater_than_equal",
"loc": ["body", "api_key_id"],
"msg": "Input should be greater than or equal to 1",
"input": 0,
"ctx": {"ge": 1}
}
]
}

For operation_unconfirmed, a timeout or a network failure, keep the original key and inspect the saved result. A failed HTTP response does not by itself prove that no action occurred.

Purchases and lifecycle · OpenAPI EN · OpenAPI RU

© 2026 AdaptGroup LLC. All rights reserved.
30 N Gould St Ste R, Sheridan, WY 82801, USA
Back to top