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

# pikopod sandbox

> Add, list, reset, and inspect sandboxes, and attach webhook envelopes.

## sandbox add

```text theme={null}
pikopod sandbox add <name> [flags]
```

Import a spec and register a sandbox served at `/<name>/`. Same flags as [`import`](/reference/cli/import) without `--update`.

## sandbox list

```text theme={null}
pikopod sandbox list
```

```text theme={null}
examplepay           sbx_41d959476a09e5f9  mode=deterministic seed=8eb1bc48ceb2fcd6  route=/examplepay/  ir=apis/examplepay.ir.json
  credential: pikopod_sbx_test_8eb1bc48ceb2fcd6ab7ba33c12f314189b3e51502ea32156
  webhooks: 2 declared, 1 triggered, 1 emit-only; envelope: hmac-sha256 in body "signature", key from $EXAMPLEPAY_WEBHOOK_KEY
```

A sandbox imported from a documentation page by model extraction is marked `⚠ DRAFT (LLM_EXTRACTED: model-written from prose docs; shapes are best-effort)`. Exits `2` when nothing is registered.

## sandbox reset

```text theme={null}
pikopod sandbox reset <name>
```

Clears the sandbox's stored resources. The seed is unchanged, so the same seed replays identically from an empty store. A running `pikopod up` keeps its in-memory journal and webhook state until restarted. The id sequence keeps advancing after a reset; for a byte-identical replay from scratch, register a fresh sandbox with the same seed.

## sandbox requests

```text theme={null}
pikopod sandbox requests <name> [--last 50] [--reset]
```

The request journal of a **running** sandbox: what your code actually sent, newest last.

```text theme={null}
#1    POST   /charges                                 → 201
#2    GET    /charges/ch_a91f3c                       → 200  (/charges/{id})
2 request(s)
```

When the bounded journal has evicted older entries, the footer says how many, because ordering claims across the gap cannot be proven. `--reset` clears the journal. See [Request journal](/sandbox/request-journal).

## sandbox webhooks

```text theme={null}
pikopod sandbox webhooks <name> <file>
```

Attach a webhook envelope and event bindings to an existing sandbox without re-importing, and without a model for a docs import. The file is the same sidecar `import --webhooks` takes.

```text theme={null}
  event payment_intent.completed fires on POST /intent-actions
  event payment_intent.failed is emit-only (fire it with `pikopod webhook emit`)
restart `pikopod up` to serve the change
```

Only declared events and declared operations are accepted; anything else is refused by name. See [Webhooks](/sandbox/webhooks).
