canonical: https://jentic.com/apis/getsandbox.com/getsandbox

# Getsandbox Sandbox API

Sandbox by getsandbox.com is an HTTP mocking and stubbing service that lets developers spin up scriptable mock servers behind their own subdomain. The v1 API exposes nine endpoints covering sandbox CRUD, fork operations to clone a sandbox into a new instance, activity search across requests, and state reset for resetting captured state between test runs. It is the control surface for managing mock servers used in contract testing, demos, and frontend development against unfinished backends.

## For AI agents

Create, fork, update, and reset HTTP mock sandboxes and search activity across them through an API_Key header.

## Scope

Does not handle production traffic routing, real backend deployment, or load testing - use for managing mock sandboxes and inspecting their request activity only.

## Capabilities

- Create a new mock sandbox under your account with an initial routing definition
- Fork an existing sandbox to spin up an isolated copy for a feature branch
- Update a sandbox's routing or stub script via PUT
- Reset a sandbox's captured state to wipe assertions and recorded calls between tests
- Search activity across sandboxes to inspect inbound requests by URL or time
- List your sandboxes and tear down unused ones with a single DELETE

## Use cases

### Per-feature-branch mock servers

Engineering teams fork a baseline mock sandbox for each feature branch so frontend changes can iterate against a contract that diverges from main without touching the shared mock. The fork endpoint returns a fresh sandbox identifier the branch's CI pipeline writes into its env vars.

Example prompt: Fork sandbox 'payments-baseline' into 'payments-feature-x' and return the new mock URL

### Reset between integration test runs

CI suites that record requests to verify behaviour need a clean slate per run. Calling DELETE `/1/sandboxes/{sandboxName}/state` wipes captured calls and assertions, so the next test starts from a known empty state and previous-run data does not leak across CI jobs.

Example prompt: Before each integration test, call DELETE `/1/sandboxes/payments-mock/state` to clear recorded interactions

### Activity search for incident triage

When a frontend or contract test fails, engineers query sandbox activity to see exactly which inbound requests landed and what was returned. The `/1/activity/search` endpoint accepts URL and time filters so you can replay the failing scenario against the mock without redeploying the upstream client.

Example prompt: Search activity in sandbox 'payments-mock' for URLs containing '/charges' between two timestamps

### AI agent for mock infrastructure ops

An ops agent connected through Jentic provisions, forks, and tears down sandboxes on demand based on chat requests like 'spin up a mock for the new auth flow'. Jentic injects the API_Key header so the agent never holds the raw credential.

Example prompt: Create a sandbox named 'auth-flow-mock' with a starter routing definition and return its public URL

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/1/sandboxes` | List sandboxes |
| POST | `/1/sandboxes` | Create a sandbox |
| GET | `/1/sandboxes/{sandboxName}` | Get a sandbox |
| PUT | `/1/sandboxes/{sandboxName}` | Update a sandbox |
| GET | `/1/sandboxes/{sandboxName}/fork` | Fork a sandbox |
| DELETE | `/1/sandboxes/{sandboxName}/state` | Reset sandbox state |
| GET | `/1/activity/search` | Search request activity |

## Key resources

- **Sandboxes** — Mock-server instances with routing and stub scripts, including fork support
- **Sandbox state** — Per-sandbox captured request state with reset support for CI isolation
- **Activity** — Request log search across sandboxes for debugging and replay

## Why Jentic

- **Setup:** Wiring the Sandbox API by hand means learning its API_Key header auth, hanging your calls off the getsandbox.com/api base, and tracking each mock sandbox by name yourself. Through Jentic you install once, import the Sandbox API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Sandbox puts the sandbox name in the URL path (`/1/sandboxes/{sandboxName}/...`), so a rule can pin your agent to one sandbox: it can inspect and fork that sandbox and nothing else. You choose the operations it may call, so destructive ones like resetting sandbox state are not included unless you add them.
- **Credential handling:** Your Sandbox API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'fork a mock sandbox' or 'search sandbox request activity', and Jentic returns the matching Sandbox operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **WireMock API** — Open-source mock server you can self-host or run as a container
- **Postman API** — Hosted mock servers backed by Postman collections
- **SwaggerHub API** — OpenAPI design hub whose schemas can drive Sandbox stubs

## FAQ

### What authentication does the Sandbox API use?

Sandbox uses an API key sent as the API_Key header on every request. Through Jentic the key is stored encrypted in the vault and injected per request, so it never enters your agent's prompt or logs.

### Can I fork a sandbox to create an isolated copy?

Yes. GET `/1/sandboxes/{sandboxName}/fork` returns a new sandbox cloned from the source, including its routing and stub script. This is the supported way to create per-feature-branch mocks without re-authoring the routing from scratch.

### What are the rate limits for the Sandbox API?

The OpenAPI spec does not declare explicit rate limits. Practical guidance is to avoid hammering `/1/activity/search` in tight polling loops and to batch sandbox lifecycle operations rather than firing them in parallel from many CI jobs at once.

### How do I reset a sandbox's state between test runs through Jentic?

Search Jentic for 'reset sandbox state', load the DELETE `/1/sandboxes/{sandboxName}/state` schema, then execute with the sandbox name. Jentic handles the API_Key injection so the reset is one structured call.

### Can I search captured request activity across sandboxes?

Yes. GET `/1/activity/search` accepts filters for URL and time so you can locate the exact inbound request from a failing test or demo without scrolling the full request log.

### Is the Sandbox API free?

Sandbox offers a free tier with limits on simultaneous sandboxes and request volume; paid plans scale up sandbox count and storage. Check getsandbox.com for current pricing before relying on the API for production-grade test infrastructure.

### Can I limit what my agent is allowed to do with the Sandbox API?

Yes. Because you run Jentic One yourself, your own rules decide which Sandbox operations and credentials the agent may use. Since the sandbox name lives in the URL path (`/1/sandboxes/{sandboxName}/...`), you can pin the agent to a single sandbox and grant only the calls you want, such as getting and forking that sandbox while withholding others. Destructive operations like DELETE `/1/sandboxes/{sandboxName}/state` to reset captured state are excluded unless you explicitly add them, so the agent cannot wipe test data you did not authorize.
