Skip to main content
POST
Create volume

Authorizations

Authorization
string
header
required

An admin API key. Personal admin keys reach the API key, billing and Account endpoints for the creator's personal account; the other endpoints need an organization admin key. Security requirement entries list the permission a scoped key needs for the operation.

Scopes

volumes.create

Body

application/json
name
string
required

Display name, without surrounding whitespace.

size_bytes
integer<int64>
required

Capacity in bytes. Bunker volumes must be one of the allowed workspace sizes in whole GB; other volumes must be a positive multiple of the disk sector size.

host_id
string<uuid>

Host to create the volume on. Required for non-Bunker volumes.

sandbox
boolean
default:false

Create a Bunker volume. Ignored for personal accounts, which always create Bunker volumes.

Response

The created volume.

id
string<uuid> | null
required
host_id
string<uuid> | null
required

Host the volume's disk lives on.

name
string
required
image
string
required

Identifier of the disk image on the host.

size_bytes
integer<int64>
required
container_id
string<uuid> | null
required

Container the volume is attached to, if any.

slot
string | null
required

Mount slot on the attached container, if any.

created_at
string<date-time> | null
required
sandbox
boolean
required

Whether this is a Bunker volume.

clerk_org_id
string | null
required

ID of the organization that owns the volume, or null for a personal volume.

clerk_user_id
string | null
required

ID of the user who owns a personal volume, or null for an organization volume.

billing_ended_at
string<date-time> | null
required

When storage billing for the volume ended, or null while it is billed.