Create a snapshot
Changed onCreates a point-in-time snapshot of a running session's filesystem. Snapshots can be used to quickly restore a session to a previous state or to create new sessions with pre-configured environments. The session must be running and able to accept commands for a snapshot to be created. The session will be terminated after the snapshot is created. Unlike v2, snapshots expire after 7 days when neither the request nor the sandbox configuration specifies an expiration.
Request
- Base URL: https://api.vercel.com
- URL: https://api.vercel.com/v3/sandboxes/sessions/{sessionId}/snapshot
- Auth: HTTP bearer
Path parameters
The unique identifier of the session to snapshot.
Query parameters
The Team identifier to perform the request on behalf of.
The Team slug to perform the request on behalf of.
Request body
Response
Example response
{
"session": {
"abortedAt": 1750344501629,
"activeCpuDurationMs": 42,
"createdAt": 1750344501629,
"cwd": "/vercel/sandbox",
"duration": 3600000,
"id": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50",
"memory": 2048,
"networkPolicy": {
"allowedCIDRs": [
"10.0.0.0/8"
],
"allowedDomains": [
"api.vercel.com",
"*.example.com"
],
"deniedCIDRs": [
"10.0.0.0/8"
],
"injectionRules": [
{
"domain": "api.vercel.com",
"headerNames": [
"Authorization",
"X-API-Key"
]
}
],
"mode": "custom"
},
"networkTransfer": {
"in": 12543852,
"out": 15368
},
"projectId": "prj_123a6c5209bc3778245d011443644c8d27dc2c50",
"region": "iad1",
"requestedAt": 1750344501629,
"requestedStopAt": 1750344501629,
"runtime": "node22",
"snapshottedAt": 1750344501629,
"sourceSandboxName": "my-sandbox",
"sourceSnapshotId": "snap_123a6c5209bc3778245d011443644c8d27dc2c50",
"startedAt": 1750344501629,
"status": "running",
"stoppedAt": 1750344501629,
"timeout": 3600000,
"updatedAt": 1750344501629,
"vcpus": 2
},
"snapshot": {
"createdAt": 1750344501629,
"creationMethod": "manual",
"expiresAt": 1750344501629,
"id": "snap_123a6c5209bc3778245d011443644c8d27dc2c50",
"lastUsedAt": 1750344501629,
"parentId": "snap_parent123",
"region": "iad1",
"regions": [
"iad1",
"sfo1"
],
"sizeBytes": 104857600,
"sourceSessionId": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50",
"status": "created",
"updatedAt": 1750344501629
}
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info