Buy a disk
Buys a Premium data disk with your personal credit, as its own bill with its own term and expiry, and returns an operation to track it. Keep the same Idempotency-Key when retrying.
Access: API key: vm:write · Session: developer, admin or owner.
- Give
vm_idto buy the disk for a server (it is created in the server's zone and attached and mounted at/mnt/<name>once the server runs), orregionandzonefor an unattached disk. - Credit is reserved while the disk is created and charged once it exists. A confirmed failure releases the reservation; an uncertain result keeps it for review.
- Insufficient credit returns
402. Paused disk sales return503 volumes_paused; paused purchasing returns503 purchases_paused. - The disk keeps its data when detached or when its server ends, and can be attached to another server in the same zone.
AuthorizationBearer <token>Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.
Idempotency-Key?stringA unique string (for example a UUID). Repeating the same request with the same key returns the original result instead of buying again.
X-Org-ID?stringSessions only: act on this organization (you must be a member). Default: your first organization.
application/json- body
name*stringAlso the mount folder /mnt/<name>.
^[a-z0-9][a-z0-9-]{0,39}$vm_id?stringBuy the disk for this server. It is created in the server's zone and attached once the server runs.
region?stringRegion of an unattached disk (with zone).
zone?stringZone of an unattached disk, from GET /v1/volume-options.
size_gb*integerWithin the region's min_gb/max_gb, in step_gb steps.
term_months*integer1312currency?stringPersonal balance to pay from (default USD).
"USD""IDR"type?stringDisk type (default premium). ssd is faster and starts at 20 GB; each type has its own price from GET /v1/volume-options?type=.
"premium""ssd"Accepted: credit is reserved and the disk is being created
application/json- response
volume*A Premium disk. It is billed on its own and keeps its data when detached.
operation*curl -X POST 'https://layerbeat.com/v1/volumes' \ -H 'Idempotency-Key: 7c1f1b0e-6f0c-4a5e-9c33-2d0c0f1c9a11' \ -H 'Content-Type: application/json' \ -d '{ "name": "data", "vm_id": "vm_gnkrp6zuxvsqki7sqxeluvsw2y", "size_gb": 50, "term_months": 1}'{ "volume": { "id": "vol_k3q9w2m7c4x8z5t6v1b0n2h4ra", "name": "data", "status": "creating", "type": "premium", "region": "sgp", "zone": "sgp-1", "size_gb": 50, "server": null, "mount_path": "/mnt/data", "mounted": false, "term_months": 1, "billing": { "currency": "USD", "amount": "3.89" }, "price_per_gb_month": { "USD": "0.07770", "IDR": "1384" }, "expires_at": null, "note": null, "created_at": "2026-10-10T10:00:00Z", "deleted_at": null }, "operation": { "id": "op_4yw4xmradad4bstgr4d5qtreb4", "type": "volume.create", "status": "pending", "vm_id": null, "volume_id": "vol_k3q9w2m7c4x8z5t6v1b0n2h4ra", "steps": [ { "name": "creating_disk", "status": "running" } ], "result": null, "error": null, "created_at": "2026-10-10T10:00:00Z", "finished_at": null }}