---
title: "Create browser snapshot"
method: POST
path: "/v1/projects/{projectId}/browser-snapshots"
tags: ["browser-snapshots"]
---

# Create browser snapshot

`POST /v1/projects/{projectId}/browser-snapshots`

Create a new browser snapshot with cookies and localStorage state. Domains are automatically extracted from cookie domains.

## Path parameters

- `projectId` string, required

## Request body

- CreateBrowserSnapshotBody
  - `name` string, required
  - `storageState` object, required
    - `cookies` object[], required
      - `name` string, required
      - `value` string, required
      - `domain` string, required
      - `path` string, required
      - `expires` number, required
      - `httpOnly` boolean, required
      - `secure` boolean, required
      - `sameSite` 'Strict' | 'Lax' | 'None', required
    - `origins` object[], required
      - `origin` string, required
      - `localStorage` object[], required
        - `name` string, required
        - `value` string, required
  - `isPrivate` boolean
  - `isDefault` boolean

## Response `200`

Success

- BrowserSnapshotDetail
  - `id` string, required
  - `projectId` string, required
  - `name` string, required
  - `domains` string[], nullable, required
  - `isPrivate` boolean, required
  - `isDefault` boolean, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `storageState` object, nullable, required
    - `cookies` object[], required
      - `name` string, required
      - `value` string, required
      - `domain` string, required
      - `path` string, required
      - `expires` number, required
      - `httpOnly` boolean, required
      - `secure` boolean, required
      - `sameSite` 'Strict' | 'Lax' | 'None', required
    - `origins` object[], required
      - `origin` string, required
      - `localStorage` object[], required
        - `name` string, required
        - `value` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Validation error
- `500` — Internal error

---

[API](https://skmtc.net/capy/apis/capy-api.md) · [All operations](https://skmtc.net/capy/apis/capy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capy/capy-api/versions/c9ea28cb32b6/schema)
