Production and Test Environments
Any changes made to a template and its associated assets are only applied within the current environment until you migrate the template and overwrite any changes to the correspondingNotification ID and assets in the other environment.
Switching Between Environments
Use the environments toggle in the lower-left settings menu to switch between your Production and Test environments. Look for theTest Environment indicator at the top of the application window to confirm that you’re in the test environment.

Simply switching from Production to Test does not impact your notifications in either environment in any way. It just changes the environment you are viewing.
API Keys and Environments
Each environment has its own API keys that determine which environment and state your requests target.New workspaces
New workspaces receive keys with thetoken_ prefix. By default you get two keys:
- Production (published) - targets live, published templates and data
- Test (published) - targets test environment published templates and data
Legacy workspaces
Older workspaces use prefix-based keys that encode the environment and state:- pk_prod_ - published data in the Production environment
- dk_prod_ - draft data in the Production environment
- pk_test_ - published data in the Test environment
- dk_test_ - draft data in the Test environment
Both key formats work the same way. The scope (environment + state) is stored server-side; the prefix is a convenience for identifying which key you’re using.

Define the Routing Behavior of Custom API Keys
Business Tier customers can also define the routing behavior of their API keys. Amock key simulates the full notification lifecycle without invoking the downstream provider, so you can see how a request flows through Courier without incurring any send cost.

Notifications, Assets and Environments
You can move a template and its associated assets (brands, tags, subscription topics) between environments in either direction. You can also select a destination workspace when migrating assets. To copy a template between environments, Courier also copies all dependencies attached to it so functionality is preserved. After you’ve copied associated assets once (e.g. a brand or category), you can choose to overwrite them in future migrations.Courier will copy the current template. All other assets copied will be their most recent published version.
Migrating Templates and Assets Between Environments
- Open the notification you wish to migrate.
- Open the dropdown menu in the ‘Publish Changes’ button.
- Select ‘Migrate Assets’.


- Select either ‘Copy Assets’ or ‘Copy And Publish’ option.


Migrating Templates to Another Workspace
If you have multiple workspaces, you can migrate a template to another workspace from the same modal.- In the migrate assets modal, choose a
Destination Workspacefrom the dropdown menu.

- Select the workspace you wish to migrate your template to.

- The template will be migrated to the selected workspace and environment.
Event Mapping and Template Migration
If you have an event mapped to a template that you are migrating between environments, the event and its mapping will automatically migrate as well. If the associated event is already mapped to a different template in the destination environment, then you will receive an error:
Integrations and Environments
Integrations are shared across environments; you only need to add an integration once and it works in both Production and Test.Adding a Test Environment Configuration
By default, all integrations work in both environments. If you want to isolate test traffic, you can add a test-specific API key for any integration. Courier will use that configuration for any notification sent with a test API key.
Data Logs, Metrics, and Environments
Data Logs and Metrics are environment-specific. Sends made with a test API key only appear in the Test environment dashboard, and sends made with a production key only appear in the Production dashboard. This applies regardless of whether your keys use thetoken_ or pk_/dk_ prefix format.
Segment and Environments
To use Courier environments with Segment, create multiple Courier destinations in Segment with different environment API keys:- Send production data from Segment using your production API key.
- Set up a second destination using your test API key for development and QA.
Content Promotion Best Practices
Courier’s environment model is designed to give you confidence when moving notification changes to production. Here’s a recommended workflow:- Build and test in Test. Create or edit templates, brands, and subscription topics using your test API key. Test sends only appear in the Test dashboard and never reach real users (unless you use real contact info).
- Validate with draft keys. If your workspace has draft keys, use them to preview unpublished template changes against real send payloads before publishing. This lets you catch rendering issues before they affect live notifications.
- Migrate to Production. Use the “Migrate Assets” flow to copy templates and their dependencies (brands, tags, subscription topics) from Test to Production. Courier copies all dependencies automatically so nothing breaks.
- Verify after promotion. Check Message Logs in the Production environment to confirm sends are rendering and delivering as expected.