Test Environment Guide
The test environment is an isolated copy of your workspace for development and integration testing. Runs made with a test API key never touch production data and never fire production webhooks, so you can exercise your whole integration, including webhook handlers, before pointing it at real documents.
How test mode works
Test mode is selected entirely by the API key. There is no separate base URL, header, or request flag.
Because definitions are shared, testing a workflow in test mode exercises exactly the definition that production will run. Because runs are isolated, nothing you submit in test mode appears in production run history.
A test key is still a real key that runs real models on the documents you send. It isolates data, not compute; use representative but non-sensitive sample documents.
Via the API
Create a test API key
In Studio, open the Developers tab, enable Test Environment, and create a key while test mode is on. Keys created in test mode are test keys; keys created with test mode off are production keys. Store the two separately, for example as EXTEND_API_KEY in your development environment and a different EXTEND_API_KEY value in production.

Configure the SDK with the test key
Every SDK reads EXTEND_API_KEY by default, so the simplest setup is to export the test key in your shell or .env and construct the client with no arguments. To choose the key explicitly, pass it to the constructor. Nothing else changes: the same code runs against production when given a production key.
Python
TypeScript
Java
Go
Register test webhook endpoints
Webhook endpoints and subscriptions are per-environment. Create a second endpoint (for example a local tunnel URL) while test mode is on, or with the test key via the API, and subscribe your workflow to it. Test runs deliver only to test endpoints; production runs never reach them. The API calls are the same as in Configure webhooks with the API; the key you use decides which environment the endpoint belongs to.


Run and verify
Create runs with the test client exactly as you would in production. Use the same polling helpers or webhooks. When your handler behaves correctly end-to-end, switch the key and nothing else.
Via Extend Studio
Toggle Test Environment in the Developers tab to switch the dashboard into test mode. While it is on, workflows you run from Studio execute against test data, and the API keys and webhook endpoints you create belong to the test environment.
What you can do with test environments
Reference
- Authentication: key scopes and the
x-extend-workspace-idheader - Webhook configuration: create endpoints and subscriptions via API
- Deployments: regional base URLs (the same for test and production)
- Create your first workflow

