Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.block_storage.post_storage_volumes(data={
"type": latitudesh_python_sdk.PostStorageVolumesBlockStorageType.VOLUMES,
"attributes": {
"project": "proj_enPbqoZ6dA2MQ",
"name": "my-data",
},
})
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.BlockStorage.PostStorageVolumes(ctx, operations.PostStorageVolumesBlockStorageRequestBody{
Data: operations.PostStorageVolumesBlockStorageData{
Type: operations.PostStorageVolumesBlockStorageTypeVolumes,
Attributes: operations.PostStorageVolumesBlockStorageAttributes{
Project: "proj_enPbqoZ6dA2MQ",
Name: "my-data",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.blockStorage.postStorageVolumes({
data: {
type: "volumes",
attributes: {
project: "proj_enPbqoZ6dA2MQ",
name: "my-data",
},
},
});
console.log(result);
}
run();curl --request POST \
--url https://api.latitude.sh/storage/volumes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "volumes",
"attributes": {
"name": "my-data",
"size_in_gb": 1500,
"project": "proj_enPbqoZ6dA2MQ"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'volumes',
attributes: {name: 'my-data', size_in_gb: 1500, project: 'proj_enPbqoZ6dA2MQ'}
}
})
};
fetch('https://api.latitude.sh/storage/volumes', 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.latitude.sh/storage/volumes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'volumes',
'attributes' => [
'name' => 'my-data',
'size_in_gb' => 1500,
'project' => 'proj_enPbqoZ6dA2MQ'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.latitude.sh/storage/volumes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"volumes\",\n \"attributes\": {\n \"name\": \"my-data\",\n \"size_in_gb\": 1500,\n \"project\": \"proj_enPbqoZ6dA2MQ\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/storage/volumes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"volumes\",\n \"attributes\": {\n \"name\": \"my-data\",\n \"size_in_gb\": 1500,\n \"project\": \"proj_enPbqoZ6dA2MQ\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "vol_Av9BVDavORm1W",
"type": "volumes",
"attributes": {
"name": "Rustic Aluminum Shoes",
"size_in_gb": 1500,
"created_at": "2026-01-14T15:57:08.000Z",
"namespace_id": null,
"connector_id": null,
"initiators": null,
"project": {
"id": "proj_enPbqoZ6dA2MQ",
"name": "Mediocre Aluminum Car",
"slug": "mediocre-aluminum-car",
"description": "Rustic Linen Shoes",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_geEQyBL2bJiVpXJgmw1YTgneKVb",
"name": "609 Team",
"slug": "609-team",
"description": "609 Team",
"address": "Apt. 590 415 Kirlin Pass, South Trenton, MT 96944",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}{
"errors": [
{
"code": "STORAGE_CREATION_FROZEN",
"status": "503",
"title": "Storage creation frozen",
"detail": "New volume creation is temporarily unavailable.",
"meta": {}
}
]
}Block Storage
Create volume
Allows you to add persistent storage to a project. These volumes can be used to store data across your servers.
POST
/
storage
/
volumes
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.block_storage.post_storage_volumes(data={
"type": latitudesh_python_sdk.PostStorageVolumesBlockStorageType.VOLUMES,
"attributes": {
"project": "proj_enPbqoZ6dA2MQ",
"name": "my-data",
},
})
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.BlockStorage.PostStorageVolumes(ctx, operations.PostStorageVolumesBlockStorageRequestBody{
Data: operations.PostStorageVolumesBlockStorageData{
Type: operations.PostStorageVolumesBlockStorageTypeVolumes,
Attributes: operations.PostStorageVolumesBlockStorageAttributes{
Project: "proj_enPbqoZ6dA2MQ",
Name: "my-data",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.blockStorage.postStorageVolumes({
data: {
type: "volumes",
attributes: {
project: "proj_enPbqoZ6dA2MQ",
name: "my-data",
},
},
});
console.log(result);
}
run();curl --request POST \
--url https://api.latitude.sh/storage/volumes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "volumes",
"attributes": {
"name": "my-data",
"size_in_gb": 1500,
"project": "proj_enPbqoZ6dA2MQ"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'volumes',
attributes: {name: 'my-data', size_in_gb: 1500, project: 'proj_enPbqoZ6dA2MQ'}
}
})
};
fetch('https://api.latitude.sh/storage/volumes', 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.latitude.sh/storage/volumes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'volumes',
'attributes' => [
'name' => 'my-data',
'size_in_gb' => 1500,
'project' => 'proj_enPbqoZ6dA2MQ'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.latitude.sh/storage/volumes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"volumes\",\n \"attributes\": {\n \"name\": \"my-data\",\n \"size_in_gb\": 1500,\n \"project\": \"proj_enPbqoZ6dA2MQ\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/storage/volumes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"volumes\",\n \"attributes\": {\n \"name\": \"my-data\",\n \"size_in_gb\": 1500,\n \"project\": \"proj_enPbqoZ6dA2MQ\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "vol_Av9BVDavORm1W",
"type": "volumes",
"attributes": {
"name": "Rustic Aluminum Shoes",
"size_in_gb": 1500,
"created_at": "2026-01-14T15:57:08.000Z",
"namespace_id": null,
"connector_id": null,
"initiators": null,
"project": {
"id": "proj_enPbqoZ6dA2MQ",
"name": "Mediocre Aluminum Car",
"slug": "mediocre-aluminum-car",
"description": "Rustic Linen Shoes",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_geEQyBL2bJiVpXJgmw1YTgneKVb",
"name": "609 Team",
"slug": "609-team",
"description": "609 Team",
"address": "Apt. 590 415 Kirlin Pass, South Trenton, MT 96944",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}{
"errors": [
{
"code": "STORAGE_CREATION_FROZEN",
"status": "503",
"title": "Storage creation frozen",
"detail": "New volume creation is temporarily unavailable.",
"meta": {}
}
]
}Was this page helpful?
⌘I