Skip to main content
An environment separates one stream of traffic from another inside your org. Every API key belongs to exactly one environment, and runs, webhook endpoints and conversations are recorded under the environment of the key that created them. A live key never reads sandbox runs, and a sandbox key never reads live runs.

Kinds

The live environment cannot be created, renamed to another slug, or deleted.

What differs between live and sandbox

The environment field on runs and webhooks is a compatibility label with two values. Use the key’s environment slug, not this label, to tell two sandboxes apart.

Slugs and names

Some older orgs have a sandbox with the slug test. It keeps working, but no new environment can take that slug.

Manage environments in the portal

Open Settings, then Environments. You need the admin or developer role. You can:
  • create a sandbox (slug, optional name),
  • rename one,
  • delete a sandbox that no API key, webhook endpoint or run still uses.
To create a key for an environment, open Settings, then API keys, and pick the environment in the create dialog.

Manage environments with the API

The environment routes accept organization keys only. A scoped key gets 403 insufficient_capability. Any organization key, from any environment, can manage all of the org’s environments. Create a sandbox:
Response 201:
The request body is at most 4 KiB and accepts only slug and name.

Deleting a sandbox

A sandbox can be deleted only when nothing references it. Every API key ever created for it counts, including revoked keys: revoking a key does not clear the blocker. Its webhook endpoints and its runs also count. Runs are removed by the 90-day retention purge, except runs flagged to be kept. While anything remains, the API answers 409 with a count of each blocker:
This is the one error body with a top-level blockers object instead of details. A successful delete answers 204 with no body.

Errors

Next

Authentication and access

Keys, capabilities and which routes need a live key.

Sandbox fixtures

Drive a run to a chosen terminal state without calling any provider.
Last modified on September 25, 2026