Create Volume
Creates a volume that can be attached to a virtual machine, expanding its storage capacity. If you install an operating system on the volume using the image_id field, it becomes a bootable volume. Specify the volume type and custom configuration in the request body. For additional details on volumes.
HTTP Request
POST {API_URL}/volumes
Body parameters
| Parameters | Requirements | Type | Description |
|---|---|---|---|
display_name | Required | string | Display name of the volume being created. A string with a maximum length of 50 characters. |
region_id | Required | string | Id of the region within which the volume will be created. Use the GET /regions endpoint to retrieve a list of regions offered by API. |
type_id | Required | string | Id of the the type of volume being created, which determines the storage technology it will use. Use the GET /volume-types endpoint to retrieve a list of all available volume types. Currently, we offer the Cloud-SSD storage type. |
size | Required | integer | The size of the volume in GB. Maximum size of 1048576 GB. |
image_id | Optional | string | The ID of an operating system image to be installed on the volume. By providing an image_id in the create volume request, you will create a bootable volume. |
description | Optional | string | A brief description or comment about the volume. |
payment_currency | Optional | string | Currency used for volume creation payment, default is USD. |
Reponse Attributes
status boolean
Indicates the success or failure of the creation of a volume. In this case, it is set to true, indicating that the volume has been created successfully. while false indicates an error.
message string
A message confirming the successful creation of the volume.
data array
An object containing details about the created volume. To learn more about about the attributes of the volume object, click here.
Example
Request
curl -X POST '{API_URL}/volumes' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"display_name":"volume-20250808-142611",
"region_id":"6730b89aef5c9d0012e47e36",
"type_id":"6880a62d56a7a90013fea667",
"payment_currency":"USD",
"size":10,
"description":"data"
}'Response
"status": true,
"data": {
"id": "689598902b54490029aa25c9",
"display_name": "volume-20250808-142611",
"name": "test-plucky-innocent-fall",
"size_gb": 10,
"status": "creating",
"description": "",
"payment_currency": "USD"
},
"message": "Volume created successfully"
