Skip to content

Create a persistent volume

POST/volumes

Creates a durable block-device volume (formatted ext4 on first use). Returns 501 when volume storage is not enabled (set --volume-dir), 409 when the name already exists.

Request bodyapplication/json
CreateVolumeRequest
namestring
size_bytesintegerint64
Responses
201 CreatedCreated
Volume
attached_tostring
created_atstringdate-time
host_idstring
namestring
size_bytesintegerint64
400 Bad requestBad Request
ErrorResponse
errorstring
409 ConflictConflict
ErrorResponse
errorstring
501 Not Implemented
ErrorResponse
errorstring
Authentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.
Request
POST/volumes
cURL
curl '/volumes' \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{}'
Response
201 Created
{
  "attached_to": "string",
  "created_at": "2026-01-02T15:04:05Z",
  "host_id": "string",
  "name": "string",
  "size_bytes": 0
}
Was this page helpful?