# Sandbox and test keys

The sandbox is a public test environment with published keys and seeded claims, devices and accounts, kept separate from live data.

The sandbox is a public test environment with published API keys and seeded data, kept entirely separate from live. Every example in these docs runs against it as written, so you can try any endpoint before you have an account.

## When to use it

- Try an endpoint or follow a guide without signing up.
- Develop and test your integration with keys that can't touch real data.
- Show a colleague a verified claim, a tampered one and a fraud ring in a few calls.

## How it works

1. **Two environments, kept apart.** Every key, device, attestation and decision belongs to `sandbox` or `live`, and every query filters on it. A sandbox key never sees live data; crossing over returns [`environment_mismatch`](https://provenanceauth.com/docs/platform/errors.md#environment_mismatch).
2. **Keys show their environment.** Sandbox keys start `prv_test_`, live keys `prv_live_`. The API and its responses are otherwise the same.
3. **The sandbox is reseeded on a schedule.** Seeded IDs, such as attestation `att_00000000000000000000000000000001`, stay the same across resets, so links in your notes keep working.

## Sandbox keys

These keys are published on purpose and reach only sandbox data. Export the one a page asks for as `PROVENANCE_KEY`.

| Key | Scopes | Use it for |
| --- | --- | --- |
| `prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe` | All | Attest claims, and Mandate intents and decisions under the default policy |
| `prv_test_verify_M3xQp9RbT2vWmK7n8sYd4cFjLhXe6gA` | `attest` | Attest verification |
| `prv_test_attest_p9RbT2vWmK7n3xQ8sYd4cFjLhXe6gAM` | `attest` | Submitting attestations |
| `prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5` | `mandate`, `authorize`, `trace`, `identify` | A Growth account: Trace, Identify, policies, approvals, agents, grants and webhooks |
| `prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x` | `mandate`, `authorize`, `trace`, `identify` | An Enterprise account: a store's Authorize checks, advanced policy conditions, registry builds and diffs |
| `prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x` | `attest` | An account with its own Attest key: capture requests |
| `prv_test_all_A1lP7vQ3bW9mK2sYd6cFjLh8gAe4tR5` | All products | The same account's All products key: request logs, events and `provenance listen`, which a key limited to some products can't read |

## Seeded data

| ID | What it is |
| --- | --- |
| `CLM-SANDBOX-CLEAN` | Two attested photos from an enrolled device: `verified`, risk 0 |
| `CLM-SANDBOX-PARTIAL` | One attested photo and two web uploads from unknown devices with no GPS; the uploads score 100, so the claim is `failed` |
| `CLM-SANDBOX-FRAUD` | Two photos changed after capture: `failed`, risk 100, already escalated |
| `CLM-SANDBOX-VIDEO` | One attested video and a copy with one chunk changed: `partial` |
| `CLM-SANDBOX-RING-A`, `CLM-SANDBOX-RING-B` | Two claims from the same device, linked as a possible fraud ring |
| `VER-SANDBOX-INSPECTION` | A field inspection with two attested photos: `verified` |
| Device `dev_00000000000000000000000000000001` | An enrolled test device, for authorize and attest calls |

## Look at a seeded claim

**curl**

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe

curl $PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-PARTIAL/provenance \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
import { Provenance } from "@provenanceauth/sdk";

const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const claim = await prov.attest.claims.getProvenance("CLM-SANDBOX-PARTIAL");
```

**Python**

```python
import os
from provenanceauth import Provenance

prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=os.environ["PROVENANCE_API"])
claim = prov.attest.claims.get_provenance("CLM-SANDBOX-PARTIAL")
```

The response, trimmed to each asset's verdict:

```json
{
  "id": "CLM-SANDBOX-PARTIAL",
  "object": "claim",
  "assets": [
    { "id": "att_00000000000000000000000000000010", "status": "failed", "risk_score": 100 },
    { "id": "att_00000000000000000000000000000011", "status": "failed", "risk_score": 100 },
    { "id": "att_00000000000000000000000000000012", "status": "verified", "risk_score": 15 }
  ],
  "overall_status": "failed",
  "overall_risk_score": 100
}
```

## Limits in the sandbox

Synthetic-media screening calls a real external detector, so the sandbox has a daily and a monthly screening budget. When either is spent, `/v1/attest/media/screen` returns `402` [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached) until it resets. [Rate limits](https://provenanceauth.com/docs/integrate/rate-limits.md) are the same as live.

[Risk scores](https://provenanceauth.com/docs/account/risk-scores.md) in the sandbox give fixed test answers at no charge. The keys on this page always get them. With your own account's sandbox key you can set `sandbox_provider: "real"` on a risk score to ask the real model; those answers come out of your monthly testing allowance and stop when it runs out.

The sandbox sends no texts to your customers: each one is recorded with the outcome a live text would have had, and you can read it back. See [test texts in the sandbox](https://provenanceauth.com/docs/messaging/test-texts.md).

## Going live

When your integration works here, [Go live](https://provenanceauth.com/docs/get-started/go-live.md) lists what changes for the live environment: the key, the base URL and the checks to run first.

## Related

- [Choose your path](https://provenanceauth.com/docs/get-started/choose-your-path.md)
- [Authentication and API keys](https://provenanceauth.com/docs/get-started/authentication.md)
- Next: [test webhooks](https://provenanceauth.com/docs/integrate/test-webhooks.md), then [test texts in the sandbox](https://provenanceauth.com/docs/messaging/test-texts.md), then [go live](https://provenanceauth.com/docs/get-started/go-live.md)
