> For the complete documentation index, see [llms.txt](https://docs.antivamp.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antivamp.io/for-launchpads/sandbox.md).

# Test in Sandbox

Self-serve sandbox keys, seeded scenarios, request logs, usage, and reservation seeding — rehearse the full lifecycle before you go live.

> **Rehearse the entire enforcement loop with a self-serve key — no approval required.**

The sandbox is a fully isolated environment with its own key prefix (`av_sbx_…`), its own signing keys, and its own state. Build and prove your integration here before requesting production access.

{% hint style="info" %}
🧭 For strict isolation, target `https://sandbox-api.antivamp.io` — it rejects production keys (and `https://api.antivamp.io` rejects sandbox keys). The canonical `https://antivamp.io` host accepts both key types and routes by prefix. The two environments never share data.

One exception worth knowing while testing: `/v1/identity/check` picks its dataset by **host**, not by key. Use `https://sandbox-api.antivamp.io` to see the seeded scenarios below — on the canonical host that endpoint answers from production, so a seeded name will read as available. See [Environments](/developers/environments.md).
{% endhint %}

## Get a key

Sandbox keys are self-serve. The raw key and webhook signing secret are **shown once** — store both server-side.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://sandbox-api.antivamp.io/api/v1/sandbox/keys \
  -H "Content-Type: application/json" \
  -d '{"organization":"Your Launchpad","email":"you@yourlaunchpad.io","label":"integration"}'
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "apiKey": "av_sbx_…",
  "signingSecret": "whsec_…",
  "environment": "sandbox"
}
```

{% endtab %}
{% endtabs %}

| Field          | Required | Notes                                                                                                                   |
| -------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `organization` | ✅        | Your launchpad or company name.                                                                                         |
| `email`        | ✅        | Technical contact for the sandbox key. Confirm it via the verification email so future rotations can be emailed to you. |
| `label`        | optional | A human label to tell multiple keys apart.                                                                              |

## Rotate a sandbox key

Self-serve rotation keeps the same `partner_id`, moves wallets / ledger / webhooks to the new key, and revokes the old key. The contact email must be **verified**.

```bash
curl -X POST https://sandbox-api.antivamp.io/api/v1/sandbox/keys \
  -H "Authorization: Bearer $ANTIVAMP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Antivamp-Rotate: 1" \
  -d '{"email":"you@yourlaunchpad.io","label":"Rotated key"}'
```

Or use **Rotate key** in the [partner console](https://antivamp.io/integrations). Production keys cannot self-rotate here — see [Keys, Email Verification & Rotation](/for-launchpads/keys-and-email.md).

## Seeded scenarios

The sandbox ships with seeded identities so you can prove enforcement immediately:

| Identity                 | Launcher          | Expected decision          |
| ------------------------ | ----------------- | -------------------------- |
| `Sandbox Fox` / `SFOX`   | authorized wallet | ✅ `allow`                  |
| `Sandbox Fox` / `SFOX`   | any other wallet  | ⛔ `block`                  |
| `Moon Badger` / `BADGER` | non-owner         | ⛔ `block` (bond-protected) |
| a fresh, made-up pair    | any wallet        | ✅ `allow`                  |

## Seed a reservation

Production reservations are on-chain only. In the sandbox you can seed one over the API to test the full lifecycle — reserve → block copycat → allow authorized → report launch → report bond → protection extended.

```bash
curl -X POST https://sandbox-api.antivamp.io/api/v1/reservations \
  -H "Authorization: Bearer $ANTIVAMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "chain": "solana", "name": "Green Robin", "ticker": "ROBIN", "launcher": "So1ana…wallet", "durationSeconds": 86400 }'
```

{% hint style="info" %}
`durationSeconds` is **required** and must be one of `86400` (24h), `259200` (3d), `604800` (7d), or `2592000` (30d). Omitting it returns `400 invalid_request`.
{% endhint %}

{% hint style="info" %}
🔒 `POST /v1/reservations` is **sandbox-only** lifecycle seeding. In production, reservations are created on-chain — this endpoint does not create a production hold.
{% endhint %}

## Inspect requests and usage

| What                                    | Endpoint                |
| --------------------------------------- | ----------------------- |
| Request logs (every call your key made) | `GET /v1/sandbox/logs`  |
| Usage counters for your key             | `GET /v1/sandbox/usage` |

Use the logs to confirm your signature verification, idempotency keys, and decision enforcement behave exactly as intended before you touch production.

## Confirm end-to-end

```bash
ANTIVAMP_API_KEY=av_sbx_… npx antivamp-conformance https://sandbox-api.antivamp.io
```

A green conformance run is the entry gate for the [Production Checklist](/for-launchpads/production-checklist.md).

{% hint style="danger" %}
🚨 Sandbox keys are still credentials — keep them server-side. Never ship any AntiVamp key in client code.
{% endhint %}

{% hint style="info" %}
📡 View the machine-readable endpoint reference at [AntiVamp API](https://antivamp.io/api).
{% endhint %}

***

## Continue exploring

* ⚡ [Integration Quickstart](/for-launchpads/quickstart.md) — the ten-minute path using a sandbox key
* 🔐 [Keys, Email Verification & Rotation](/for-launchpads/keys-and-email.md) — verify contact + rotate safely
* ✅ [Validate Every Launch](/for-launchpads/validate-every-launch.md) — the decision contract you exercise here
* 🔔 [Process Webhooks](/for-launchpads/process-webhooks.md) — test signed deliveries with `POST /v1/webhooks/test`
* ✅ [Production Checklist](/for-launchpads/production-checklist.md) — moving from sandbox to `av_live_…`
* 🌐 [Environments](/developers/environments.md) — the full sandbox/production isolation model


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.antivamp.io/for-launchpads/sandbox.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
