Copy one generation of a volume
A new volume that starts from one generation (the newest by default) and shares every unchanged block with it, so it costs nothing to make.
Not available yet Volumes are not served by the API yet. Their calls answer from a stand-in.
A new volume that starts from one generation (the newest by default) and shares every unchanged block with it, so it costs nothing to make. A copy of a volume with no generation is empty ("stale beats missing": with none, a job runs cold). A generation past the cell's retention is gone: not_found. A generation that does not exist is invalid.
A key with the sandboxes:write scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/volumes/vol_3ahrz6dmv29gqy5ckt18fpx4b/copy" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"generation":0}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
volume_id | path | string | Yes | A block volume. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
generation | integer | No | The generation to copy; 0 for the newest. Default 0. At least 0. |
name | string | No | The copy's label; the source's by default. |
Answer
201. The copy.
{
"id": "vol_3ahrz6dmv29gqy5ckt18fpx4b",
"project": "prj_3ahrz6dmv29gqy5ckt18fp",
"name": "example",
"size_gb": 1,
"copied_from": null,
"generations": [
{
"number": 1,
"created_at": "2026-11-23T12:00:00.000Z",
"size_gb": 1
}
],
"attached_to": null,
"created_at": "2026-11-23T12:00:00.000Z"
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | A block volume. |
project | string | Yes | |
name | string | Yes | A label, not unique. |
size_gb | integer | Yes | GiB. From 1 to 256. |
copied_from | VolumeSource | null | Yes | |
generations | VolumeGeneration[] | Yes | Oldest first. A copy of one past the cell's retention is not_found. |
attached_to | string | null | Yes | The sandbox the volume is attached to, if any. |
created_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. 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.copy(id, { generation }) |
| Python | pod.volumes.copy(id, generation=…) |