Save a volume's current state as a new generation

Freezes what the sandbox wrote to the volume into a read-only generation, which copies can start from, and goes on writing on top of it.

POST/v1/sandboxes/{sandbox_id}/volumes/{volume_id}/publish

Not available yet Volumes are not served by the API yet. Their calls answer from a stand-in.

Freezes what the sandbox wrote to the volume into a read-only generation, which copies can start from, and goes on writing on top of it. A throwaway or locked volume is conflict. The cell keeps the newest generations and drops older ones after a while (the cell's retention).

A key with the sandboxes:write scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/volumes/vol_3ahrz6dmv29gqy5ckt18fpx4b/publish" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes
volume_idpathstringYesA block volume.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Answer

200. The volume, with its new generation last.

200
{
  "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"
}
FieldTypeAlwaysWhat it is
idstringYesA block volume.
projectstringYes
namestringYesA label, not unique.
size_gbintegerYesGiB. From 1 to 256.
copied_fromVolumeSource | nullYes
generationsVolumeGeneration[]YesOldest first. A copy of one past the cell's retention is not_found.
attached_tostring | nullYesThe sandbox the volume is attached to, if any.
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.

Errors

The refusals this call is known for: conflict, 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

ClientCall
TypeScriptpod.volumes.publish(sandbox, volume)
Pythonpod.volumes.publish(sandbox, volume)