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",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "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",
    "reserved_ip": "<string>",
    "public_ipv4_address": "15.204.178.3",
    "public_ipv6_address": "<string>",
    "private_ipv4_address": "10.10.0.96",
    "private_ipv6_address": "<string>",
    "tags": [
      "<string>"
    ],
    "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

Example:

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

pricing_id
integer
required

Pricing plan ID (1-13) that determines vCPU, RAM, storage, and bandwidth

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

3

region
string
required

Data center region

Example:

"us-east"

project_id
string<uuid>

Project to assign VM to

ssh_keys
string[]

SSH public keys for VM access

password
string

Optional root password

extra_storage
integer

Additional storage in GB

Required range: x >= 0
Example:

100

extra_storage_type
enum<string>

Filesystem type for extra storage

Available options:
ext4,
xfs,
btrfs
Example:

"ext4"

backup_type
enum<string>

Backup schedule type

Available options:
none,
daily,
weekly,
monthly
Example:

"weekly"

backup_time
string

Backup time (e.g., "8am")

Example:

"8am"

backup_date
string

Backup day for weekly/monthly schedules

Example:

"Saturday"

tags
string[]

Custom tags for the VM

vpc_id
string<uuid>

Attach to an existing VPC

vpc_name
string

Create a new VPC with this name (requires vpc_cidr)

Required string length: 1 - 64
Example:

"my-custom-vpc"

vpc_cidr
string

CIDR block for new VPC (requires 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