Attach a volume to a running sandbox
The volume appears in the sandbox as a disk of its own.
Not available yet Volumes are not served by the API yet. Their calls answer from a stand-in.
The volume appears in the sandbox as a disk of its own. A volume is attached to one sandbox at a time: one attached elsewhere is conflict, and so is a sandbox that is not running. With locked, the volume is made ready but the sandbox cannot see it until unlock (Pod CI attaches a warm folder at create and unlocks it once the job is known). With throwaway, its writes stay on the sandbox's server and are gone when it is detached; it cannot be published. A volume can also be attached at create (CreateSandboxRequest.volumes). The volume and sandbox must belong to the same project and test or live mode.
A key with the sandboxes:write scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/volumes" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"volume":"vol_3ahrz6dmv29gqy5ckt18fpx4b"}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes | |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
volume | string | Yes | A block volume. |
locked | boolean | No | Make the volume ready but hidden from the sandbox until unlock. Default false. |
throwaway | boolean | No | Keep the sandbox's writes on its server only; they are gone at detach. Default false. |
Answer
200. The volume, attached.
{
"volume": "vol_3ahrz6dmv29gqy5ckt18fpx4b",
"sandbox": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
"locked": false,
"throwaway": false,
"attached_at": "2026-11-23T12:00:00.000Z"
}| Field | Type | Always | What it is |
|---|---|---|---|
volume | string | Yes | A block volume. |
sandbox | string | Yes | |
locked | boolean | Yes | |
throwaway | boolean | Yes | |
attached_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
Errors
The refusals this call is known for: invalid, not_found, conflict. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.volumes.attach(sandbox, volume, { locked }) |
| Python | pod.volumes.attach(sandbox, volume, locked=…) |