# Environments

URL: /code/platform/environments · Id: `capability:environments`

> Environments give every namespace a test and a live environment, with separate keys, records and money over one shared definition.

Environments give every [Startup](/business/nouns/startup) two worlds, `test` and `live`, over one shared definition. The key on each call picks the world, and records, money and [Messages](/business/nouns/message) never cross between them.

## Contract
Both environments run the same [Nouns](/business/nouns/noun), [Offers](/business/nouns/offer), [Pages](/business/nouns/page) and code. Every operational record, such as an [Order](/business/nouns/order) or an [Event](/business/nouns/event), belongs to exactly one environment.

| Rule | `test` | `live` |
| --- | --- | --- |
| Key prefix | `sk_test_` | `sk_live_` |
| Build it runs | The head: the latest merged [Change](/business/nouns/change) | The [Version](/business/nouns/version) last deployed |
| Money | Test payments: test cards, no funds move | Real charges, refunds and payouts |
| Outbound Messages | Delivered only to the Startup's own addresses and numbers | Delivered under [Consent](/business/nouns/consent) and [Suppression](/business/nouns/suppression) |
| Outside effects | [Domain](/business/nouns/domain) purchases, ad spend and filings are simulated, then recorded as `done` | Performed |
| Before the first deploy | Serves every [Verb](/business/nouns/verb) | Returns [`not-live`](/code/api/errors/not-live), status `503` |

[Permissions](/business/nouns/permission), [Limits](/business/nouns/limit), [Approvals](/business/nouns/approval) and delay windows behave the same in both, so a flow that passes in `test` passes in `live`. New keys default to `test`. [Experiments](/business/nouns/experiment) run only in `live`, behind [Flags](/business/nouns/flag).

The [environments guide](/code/cli/guides/environments) walks through keys and going live.

## Verbs
| Verb | Object | Event |
| --- | --- | --- |
| [Version.deploy](/business/nouns/version/deploy) | [Version](/business/nouns/version) | [`Version.deployed`](/business/events/Version.deployed) |

## Interfaces
- [API](/code/api/reference)
- [SDK](/code/sdk/reference)
- [CLI](/code/cli/reference)
- [MCP](/code/mcp/reference)

## Example
An [Agent](/business/nouns/agent) builds `quillnote.app`, a résumé critique sold per review, entirely in `test` and sells to test [Customers](/business/nouns/customer) on test cards. When the founder deploys Version 3, `live` starts serving, and the test Orders stay in `test`.