Bulk Delete VMs
curl --request DELETE \
--url https://api.rafftechnologies.com/api/v1/vms/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Project-ID: <x-project-id>' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"volume_action": "detach",
"delete_vpc": false
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/vms/bulk"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"volume_action": "detach",
"delete_vpc": False
}
headers = {
"X-Project-ID": "<x-project-id>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Project-ID': '<x-project-id>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
volume_action: 'detach',
delete_vpc: false
})
};
fetch('https://api.rafftechnologies.com/api/v1/vms/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rafftechnologies.com/api/v1/vms/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'volume_action' => 'detach',
'delete_vpc' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Project-ID: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/vms/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-Project-ID", "<x-project-id>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.rafftechnologies.com/api/v1/vms/bulk")
.header("X-Project-ID", "<x-project-id>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/vms/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Project-ID"] = '<x-project-id>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"total_count": 123,
"success_count": 123,
"failed_count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"message": "<string>",
"error": "<string>"
}
]
}{
"error": "Bad Request",
"message": "X-Project-ID required"
}Lifecycle
Bulk Delete VMs
Delete up to 50 virtual machines in a single request.
Each VM is processed independently — if some deletions fail, others still succeed. The response includes per-VM results so you can identify and retry failures.
Attached Volumes
Control what happens to volumes attached to the VMs with volume_action:
detach(default) — volumes are detached and kept. They remain billable and can be re-attached to another VM.delete— volumes are permanently deleted along with the VM.
VPC Cleanup
Set delete_vpc to true to also delete each VM’s associated VPC (default false). A VPC is only deleted if no other VMs are using it.
Billing
For VMs with active subscriptions, the remaining prepaid balance is refunded pro-rata (hourly precision) to your account balance.
DELETE
/
api
/
v1
/
vms
/
bulk
Bulk Delete VMs
curl --request DELETE \
--url https://api.rafftechnologies.com/api/v1/vms/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Project-ID: <x-project-id>' \
--data '
{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"volume_action": "detach",
"delete_vpc": false
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/vms/bulk"
payload = {
"ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"volume_action": "detach",
"delete_vpc": False
}
headers = {
"X-Project-ID": "<x-project-id>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Project-ID': '<x-project-id>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
volume_action: 'detach',
delete_vpc: false
})
};
fetch('https://api.rafftechnologies.com/api/v1/vms/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rafftechnologies.com/api/v1/vms/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'volume_action' => 'detach',
'delete_vpc' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Project-ID: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/vms/bulk"
payload := strings.NewReader("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("X-Project-ID", "<x-project-id>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.rafftechnologies.com/api/v1/vms/bulk")
.header("X-Project-ID", "<x-project-id>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/vms/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Project-ID"] = '<x-project-id>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"volume_action\": \"detach\",\n \"delete_vpc\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"total_count": 123,
"success_count": 123,
"failed_count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"message": "<string>",
"error": "<string>"
}
]
}{
"error": "Bad Request",
"message": "X-Project-ID required"
}Updated May 8, 2026
Authorizations
Headers
Body
application/json
Response
Bulk deletion results
Last modified on May 8, 2026