# Sandbox & testing

## Sandbox workspaces

A sandbox is a separate TruTec workspace for your company, set up for building and testing an integration. It comes with sample data so every endpoint returns something real-shaped on day one:

- customers and sites,
- jobs at different stages, with photos,
- estimates with line items, versions and proposal status,
- job costs and invoices,
- at least one measured parking lot.

The sandbox uses the same base URL and the same API as production. Its keys can only see sandbox data, so test code can never read or change your real records, and your team's day-to-day work never shows up in your tests.

To get one, email [support@trutec.ai](mailto:support@trutec.ai) or ask your TruTec contact. Tell us who should be an owner of the sandbox (owners create its keys) and what you're building, and we'll load data that fits.

## Going to production

1. Build and test with a sandbox key.
2. Create a key in your production workspace (**Settings › API keys**) (ask us to make it read-only if your integration only reads).
3. Swap the key in your production config. Nothing else changes.

IDs differ between the sandbox and production, so don't copy IDs between them. Match records by your own reference instead: jobs, customers and sites accept an external reference for exactly this ([Jobs](jobs.md#syncing-with-your-own-system)).

## Testing tips

- **Each measurement runs a real AI takeoff,** in the sandbox too. Measure a few sites once and reuse their `job_id`: reading a finished result again is free ([Measure a site](measure-a-site.md)).
- **Test webhooks against a request inspector first,** then your own endpoint. The delivery log and replay endpoints let you resend anything you missed ([Webhooks & events](webhooks-and-events.md)).
- **Prefix test records** you create (for example an external reference starting `test-`) so they are easy to find and remove.
- **Point your AI assistant at the sandbox first.** The [MCP server](mcp.md) uses the same keys, so a sandbox key gives the assistant sandbox data only.

## Partner dev keys

Software platforms using the [Partner API](partner-api.md) can also get a partner dev key, which is limited to partner sandbox flows. See [Partner API](partner-api.md) for what it can and can't do.
