> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/daytonaio/daytona/llms.txt
> Use this file to discover all available pages before exploring further.

# Create volume

> Create a new persistent volume for data storage

Create a new volume for persistent data storage across sandboxes.

## Request body

<ParamField path="name" type="string" required>
  Unique name for the volume. Must be unique within the organization.
</ParamField>

<ParamField path="size" type="integer">
  Volume size in GB. Defaults to 10GB if not specified.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the volume
</ResponseField>

<ResponseField name="name" type="string">
  Volume name
</ResponseField>

<ResponseField name="size" type="integer">
  Volume size in GB
</ResponseField>

<ResponseField name="state" type="string">
  Current state: `creating`, `ready`, `deleting`, `deleted`, `error`
</ResponseField>

<ResponseField name="organizationId" type="string">
  ID of the organization that owns the volume
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of volume creation
</ResponseField>

## Example request

```bash theme={null}
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

```json theme={null}
{
  "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
