> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useshipd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapshots

> The evaluation payload SDKs download from the edge.

## Overview

A snapshot is the derived, evaluation-ready document for one environment. Postgres owns definitions; KV holds only this blob. SDKs never see audit logs, secrets, tags, or `managedBy`.

## Shape

```json theme={null}
{
  "schemaVersion": 1,
  "projectId": "prj_fieldkit_web",
  "environmentId": "env_prod_01",
  "environmentKey": "production",
  "version": 42,
  "generatedAt": "2026-08-18T16:04:00.000Z",
  "flags": {
    "new-checkout": {
      "key": "new-checkout",
      "type": "boolean",
      "enabled": true,
      "default": false,
      "version": 7,
      "rules": [],
      "fallthrough": { "kind": "boolean", "value": false }
    }
  },
  "segments": {}
}
```

`version` is `environment.snapshot_version` — monotonic per environment, independent of per-flag versions.

## How it gets there

1. Control-plane mutation + audit commit
2. `snapshot_outbox` row
3. Materialize → KV `snapshots/{environmentId}/current.json`
4. Notify `ws-gateway` (`snapshot.updated`)
5. Mark outbox processed

Failed KV/notify leaves the outbox pending. Retry with `shipd snapshots publish` or wait for the drain interval.

## SDK rules

* Fetch current snapshot only (no replay of versions 11–14 if you jumped 10 → 15)
* Ignore HTTP bodies with `version < local` (no rollback)
* After notify, retry while `version < notified` (KV lag), then keep last good
* Unsupported `schemaVersion` → `onError`, keep last good

`ETag: "snapshot-<version>"`. Send `If-None-Match` to get `304`.

## Next

* How-to: [Publish a snapshot](/how-to/publish-a-snapshot)
* [Edge API](/reference/edge-api)
* [Architecture](/concepts/architecture)
