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

# Sandbox

> Use the Essal sandbox environment to safely test all API operations without affecting live data.

The **Essal Sandbox** is a fully functional replica of the production API that resets every 24 hours. It is the safest place to build and test integrations before going live.

## Sandbox Characteristics

* All six apps are fully available
* All write operations succeed and return realistic IDs
* Webhook events fire to your configured sandbox endpoint
* No real emails, SMS, or third-party notifications are triggered
* Data is wiped and reset daily at **00:00 UTC**
* Rate limits are relaxed compared to production (3× the standard limit)

## Connecting to the Sandbox

Use the sandbox base URL and a sandbox-specific API key:

```bash theme={null}
curl -X GET https://sandbox.essal.cloud/v1/office/documents \
  -H "X-API-Key: esk_sandbox_xxxxxxxxxxxxxxxxxxxx"
```

Sandbox API keys are prefixed with `esk_sandbox_`. Generate one in **Settings → Developer → API Keys → Sandbox**.

## SDK Configuration

```ts theme={null}
import { EssalClient } from "@essal/sdk";

const client = new EssalClient({
  apiKey: process.env.ESSAL_SANDBOX_API_KEY,
  environment: "sandbox",
});
```

## Seeding Test Data

The sandbox ships with a default set of seed data — sample documents, contacts, deals, projects, and users — that is restored on each daily reset. You can also seed your own data using the sandbox seed endpoint:

```bash theme={null}
POST https://sandbox.essal.cloud/v1/sandbox/seed
{
  "preset": "sales_demo",
  "contacts": 50,
  "deals": 20,
  "projects": 5
}
```

Available presets: `minimal`, `sales_demo`, `full_suite`.

## Webhook Testing in the Sandbox

Configure a sandbox-specific webhook endpoint. The sandbox fires the same events as production, making it ideal for end-to-end webhook testing:

```bash theme={null}
POST https://sandbox.essal.cloud/v1/webhooks
{
  "url": "https://your-dev-server.example.com/webhook",
  "events": ["*"]
}
```

<Tip>
  Use a tool like [ngrok](https://ngrok.com) or [Hookdeck](https://hookdeck.com) to expose your local development server to receive sandbox webhook events.
</Tip>
