> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keystoneos.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> Manage platform environments for data isolation.

<Info>
  Environments can also be managed in the [KeyStone Dashboard](https://app.keystoneos.xyz) under **Settings > Environments** - no code required.
</Info>

## create / list / get / update / deactivate

```python theme={null}
env = await client.environments.create({
    "name": "Staging",
    "slug": "staging",
    "auth0_client_id": "your-staging-client-id",
    "default_timeout_seconds": 3600,
})

result = await client.environments.list()
env = await client.environments.get("env-uuid")

await client.environments.update("env-uuid", {
    "default_timeout_seconds": 7200,
    "rate_limit_rpm": 1000,
})

# Deactivate (preserves data, blocks M2M auth)
await client.environments.deactivate("env-uuid")
```

### Environment fields

| Field                     | Type          | Description                  |
| ------------------------- | ------------- | ---------------------------- |
| `id`                      | `UUID`        | Environment UUID             |
| `platform_id`             | `UUID`        | Parent platform UUID         |
| `name`                    | `str`         | Display name                 |
| `slug`                    | `str`         | URL-friendly identifier      |
| `auth0_client_id`         | `str`         | M2M credential               |
| `webhook_url`             | `str \| None` | Default webhook URL          |
| `api_version`             | `str \| None` | Pinned API version           |
| `default_timeout_seconds` | `int`         | Default settlement timeout   |
| `is_active`               | `bool`        | Whether M2M auth is accepted |
| `rate_limit_rpm`          | `int \| None` | Rate limit override          |
