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

# Errors and testing

> Error envelope, idempotency, rate limits, and sandbox testing for the Decision API.

# Errors and testing

## Error envelope

API errors return a structured envelope. Use machine-readable `code` (and `type`) for control flow — do not parse `message` text.

```json theme={null}
{
  "error": {
    "type": "invalid_request",
    "code": "missing_idempotency_key",
    "message": "Idempotency-Key is required for this write.",
    "request_id": "req_..."
  }
}
```

Include `request_id` when you contact support.

## Idempotency

Send `Idempotency-Key` on mutating writes that require it (transactions, underwrite, and other financial or decision writes documented on the endpoint). Retries with the same key return the same result.

## Sandbox

When provisioned, sandbox is a Decision API environment for demos, CI, and partner integration:

* Deterministic / simulated decision paths for demos
* No live money movement
* Safe end-to-end scripts: entity → underwrite → webhook
* Isolated keys and data from production
* Host status: intended `sandbox.api.vence.one` is **founder-beta / coming online**

## Rate limits

Respect `429` with backoff. Prefer bulk ingest patterns documented per endpoint when loading historical cashflow.

## Checklist before go-live

* [ ] Signature verification on webhooks
* [ ] Idempotency on retries
* [ ] Persist `decision_id`, reasons, and policy/model versions
* [ ] Production keys scoped to least privilege (only after Vence enables live for your program)

Next: [Webhooks](/developers/webhooks), [SDKs](/developers/sdks).
