---
title: get-a-snapshot
product: vercel
url: /docs/rest-api/sandboxes/get-a-snapshot
canonical_url: "https://vercel.com/docs/rest-api/sandboxes/get-a-snapshot"
last_updated: 2026-09-15
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about get-a-snapshot on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Get a snapshot

```http
GET /v2/sandboxes/snapshots/{snapshotId}
```

Retrieves detailed information about a specific snapshot, including its creation time, size, expiration date, and the source session it was created from.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `snapshotId` | string. maxLength: 33; pattern: `^(?:snap_[A-Za-z0-9]{28}|vhs_[a-z0-9]{28})$` | Yes | The unique identifier of the snapshot to retrieve. |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v2/sandboxes/snapshots/snapshotId?teamId=string&slug=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v2/sandboxes/snapshots/snapshotId?teamId=string&slug=string', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v2/sandboxes/snapshots/snapshotId?teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "snapshot": {
    "id": "snap_123a6c5209bc3778245d011443644c8d27dc2c50",
    "sourceSessionId": "sbx_123a6c5209bc3778245d011443644c8d27dc2c50",
    "region": "iad1",
    "regions": [],
    "status": "created",
    "sizeBytes": "104857600",
    "expiresAt": "1750344501629",
    "createdAt": "1750344501629",
    "updatedAt": "1750344501629",
    "lastUsedAt": "1750344501629",
    "creationMethod": "manual",
    "parentId": "snap_parent123"
  }
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "snapshot"
  ],
  "properties": {
    "snapshot": {
      "type": "object",
      "description": "This object contains information related to a Snapshot of a Vercel Sandbox session (v2 API).",
      "required": [
        "createdAt",
        "id",
        "lastUsedAt",
        "sizeBytes",
        "sourceSessionId",
        "status",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the snapshot."
        },
        "sourceSessionId": {
          "type": "string",
          "description": "The unique identifier of the session from which the snapshot was created."
        },
        "region": {
          "type": "string",
          "description": "The region where the snapshot is stored."
        },
        "regions": {
          "type": "array",
          "description": "The regions where the snapshot is available.",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "type": "string",
          "description": "The status of the snapshot.",
          "enum": [
            "created",
            "deleted",
            "failed"
          ]
        },
        "sizeBytes": {
          "type": "number",
          "description": "The size of the snapshot in bytes."
        },
        "expiresAt": {
          "type": "number",
          "description": "The time when the snapshot will expire, in milliseconds since the epoch. If not set, the snapshot does not have any expiration."
        },
        "createdAt": {
          "type": "number",
          "description": "The time when the snapshot was created, in milliseconds since the epoch."
        },
        "updatedAt": {
          "type": "number",
          "description": "The last time the snapshot was updated, in milliseconds since the epoch."
        },
        "lastUsedAt": {
          "type": "number",
          "description": "The last time the snapshot was used (e.g. to resume or create a sandbox), in milliseconds since the epoch. Falls back to `createdAt` for older snapshots that predate this field."
        },
        "creationMethod": {
          "type": "string",
          "description": "The method used to create the snapshot.",
          "enum": [
            "automatic",
            "manual"
          ]
        },
        "parentId": {
          "type": "string",
          "description": "The unique identifier of the parent snapshot, if this snapshot was created from another snapshot."
        }
      }
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

### 429: No description

---

## Related

- [sandboxes endpoints](/docs/rest-api#sandboxes)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
