Add VPS disk

Attach a new non-root disk to a VPS. For regular fixed-cycle VPS services, this consumes already-purchased Attachable Block Storage from GET /api/v2/vps/{id}/storage-quota; sizeGb must be less than or equal to attachable.availableGb. If regular VPS attachable capacity is insufficient, first call `GET…

Read full description Hide full description

Attach a new non-root disk to a VPS. For regular fixed-cycle VPS services, this consumes already-purchased Attachable Block Storage from GET /api/v2/vps/{id}/storage-quota; sizeGb must be less than or equal to attachable.availableGb. If regular VPS attachable capacity is insufficient, first call GET /api/v2/vps/{id}/actions/upgrade, find configurableOptions[].key === "additionalStorageGb", then preview/commit POST /api/v2/vps/{id}/actions/config with resources.additionalStorageGb; re-read storage quota before retrying. For pay-as-you-go Cloud VPS services, this consumes the account Cloud VPS storage limit from GET /api/v2/vps/payg/limits; sizeGb must be less than or equal to remaining.storageGb. If the Cloud VPS storage limit is already reached, the endpoint returns 403 Problem Details with code: "cloud_storage_limit_exceeded" and top-level extension field actions.canAddDisk.allowed: false; request a storage limit increase before retrying. Use the storageGb configurable option for main/root disk capacity on regular VPS services, not this add-disk endpoint. Send sizeGb as a whole number from 1 to 1000. interface defaults to scsi; storage placement is selected by the server and must not be supplied by new integrations. After success, the API has attached a virtual disk only; the customer still needs to partition, format, and mount it inside the VPS operating system.

VPS Services VM

Authentication

Required API scopes: write:vmwrite:storage

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

Context

Path Parameters

id string required Example: vps_01hxa3b4c5d6e7f8g9h0j1k2m3

Public VPS ID. Get it from GET /api/v2/vps `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Accept Example
Content-Type Example

Body

required
application/json
sizeGb integer required · Example: 100
interface string · Example: scsi
cache string · Example: none

Responses

200 Disk added.
disk object required
disk.id string required · Example: vpsdisk_01hxa3b4c5d6e7f8g9h0j1k2m3
disk.name string required · Example: scsi1
disk.sizeGb integer required · Example: 100
disk.interface string required · Example: scsi
400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 The disk cannot be added because the caller lacks permission or the Cloud VPS storage limit is reached.

No response body

404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
POST https://cloud.hostup.se/api/v2/vps/{id}/actions/add-disk
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/add-disk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "sizeGb": 100,
    "interface": "scsi"
  }'
Response
{
  "disk": {
    "id": "vpsdisk_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "name": "scsi1",
    "sizeGb": 100,
    "interface": "scsi"
  }
}
Request Body Add 100 GB disk
{
  "sizeGb": 100,
  "interface": "scsi"
}