Skip to main content
Create a new volume for persistent data storage across sandboxes.

Request body

name
string
required
Unique name for the volume. Must be unique within the organization.
size
integer
Volume size in GB. Defaults to 10GB if not specified.

Response

id
string
Unique identifier for the volume
name
string
Volume name
size
integer
Volume size in GB
state
string
Current state: creating, ready, deleting, deleted, error
organizationId
string
ID of the organization that owns the volume
createdAt
string
ISO 8601 timestamp of volume creation

Example request

curl -X POST https://api.daytona.io/volumes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-data-volume",
    "size": 50
  }'

Example response

{
  "id": "vol_abc123xyz",
  "name": "my-data-volume",
  "size": 50,
  "state": "ready",
  "organizationId": "org_123",
  "createdAt": "2024-01-15T10:30:00Z"
}

Common use cases

  • Data persistence: Store data that survives sandbox deletion
  • Shared storage: Share data between multiple sandboxes
  • Database volumes: Persistent storage for database containers
  • Build caches: Speed up builds with cached dependencies

Build docs developers (and LLMs) love