Skip to main content
POST
/
api
/
v1
/
vms
Create VM
curl --request POST \
  --url https://api.raffcomputing.com/api/v1/vms \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-Project-ID: <x-project-id>' \
  --data '
{
  "name": "my-ubuntu-server",
  "template_id": "5ac21891-32e6-41ce-8a93-b5d6ab708b0d",
  "pricing_id": 3,
  "region": "us-east",
  "ssh_keys": [
    "<string>"
  ],
  "password": "<string>",
  "extra_storage": 100,
  "extra_storage_type": "ext4",
  "backup_type": "weekly",
  "backup_time": "8am",
  "backup_date": "Saturday",
  "tags": [
    "<string>"
  ],
  "vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vpc_name": "my-custom-vpc",
  "vpc_cidr": "10.0.1.0/24"
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "my-ubuntu-server",
    "status": "active",
    "cpu": 2,
    "ram": 4,
    "storage": 80,
    "added_storage": 0,
    "total_storage": 80,
    "template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "template_name": "Ubuntu",
    "template_version": "24.10x64",
    "vm_id": 123,
    "version": "<string>",
    "price_per_hour": "0.027764",
    "pricing_id": 3,
    "created_by": "<string>",
    "billing_type": "payg",
    "subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "backup_type": "weekly",
    "region": "us-east",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "public_ipv4_address": "15.204.178.3",
    "public_ipv6_address": "<string>",
    "private_ipv4_address": "10.10.0.96",
    "private_ipv6_address": "<string>",
    "tags": [
      {
        "id": "<string>",
        "name": "<string>",
        "priority": 123,
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "active": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Each key is bound to a specific account.

Headers

X-Project-ID
string<uuid>
required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Body

application/json
name
string
required

VM display name

Required string length: 1 - 64
Example:

"my-ubuntu-server"

template_id
string<uuid>
required

OS template ID. Use GET /api/v1/public/templates to list available templates.

Example:

"5ac21891-32e6-41ce-8a93-b5d6ab708b0d"

pricing_id
integer
required

Pricing plan ID that determines vCPU, RAM, storage, and bandwidth. Use GET /api/v1/public/pricing/vm to list available plans.

Required range: 1 <= x <= 13
Example:

3

region
enum<string>
required

Data center region

Available options:
us-east
Example:

"us-east"

ssh_keys
string[]

SSH public keys for VM access. Required for Linux VMs if no password is provided. Ignored for Windows VMs.

password
string

Root password for the VM. Required for Windows VMs. For Linux VMs, required if no SSH keys are provided. Both SSH keys and password can be set on Linux. Must be at least 12 characters with: 2+ uppercase letters, 2+ digits, 1+ special character (@+-.,!). Only alphanumeric characters and @+-.,! are allowed.

Minimum string length: 12
extra_storage
integer

Additional block storage volume in GB (0–10,000). Attached as a separate disk to the VM.

Required range: x >= 0
Example:

100

extra_storage_type
enum<string>

Filesystem type for extra storage. Required for Linux VMs with extra storage (defaults to ext4 if omitted). For Windows VMs, storage is automatically formatted as NTFS — this field is ignored.

Available options:
ext4,
xfs,
btrfs
Example:

"ext4"

backup_type
enum<string>

Set daily for daily backups or weekly for weekly backups. Use none or omit for no backups.

Available options:
none,
daily,
weekly
Example:

"weekly"

backup_time
string

Time of day to run backups (e.g. 8am). Defaults to 8am if not specified.

Example:

"8am"

backup_date
string

Day of the week for weekly backups (e.g. Saturday). Required when backup_type is weekly, ignored for daily backups. Valid values: Monday–Sunday.

Example:

"Saturday"

tags
string[]

Custom tags for the VM

vpc_id
string<uuid>

Attach VM to an existing VPC by its ID. If omitted along with vpc_name, a VPC is auto-created.

vpc_name
string

Create a new VPC with this name. Must be used together with vpc_cidr.

Required string length: 1 - 64
Example:

"my-custom-vpc"

vpc_cidr
string

CIDR block for the new VPC (e.g. 10.0.1.0/24). Must be used together with vpc_name.

Pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}$
Example:

"10.0.1.0/24"

Response

VM created successfully

success
boolean
data
object