---
title: "Create Environment"
method: POST
path: "/public/v1/account/{accountSlug}/project/{projectSlug}/environments"
tags: ["Virtual Environments"]
---

# Create Environment

`POST /public/v1/account/{accountSlug}/project/{projectSlug}/environments`

## Request

- Base URL: `https://api.tenderly.co/api`
- URL: `https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments`
- Auth: one of:
  - API key in header `X-Access-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/tenderly/apis/tenderly-api/docs/public/v1/account/:accountSlug/project/:projectSlug/environments/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new multi-chain environment with Virtual Environments across specified networks

## Path parameters

- `accountSlug` string, required
- `projectSlug` string, required

## Request body

- EnvCreateEnvironmentRequest: Request body for creating a new multi-chain environment
  - `display_name` string, required: Display name of the environment
  - `slug` string: URL-safe slug for the environment. Auto-generated from display_name if omitted.
  - `network_configs` object[], required: List of network configurations for this environment
    - `network_id` string, required: The parent network ID to fork
    - `block_number` string: Block number to fork at (hex-encoded). Latest block is used if omitted.
    - `chain_config_overrides` object: Override chain configuration parameters
      - `chain_id` string: Override the chain ID
    - `explorer_config` object: Configuration for the block explorer integration
      - `enabled` boolean: Whether the explorer is enabled
      - `verification_visibility` 'src' | 'abi' | 'bytecode': Visibility level of contract source verification
    - `accounts` object[]: Pre-funded accounts for this network
      - `address` string: Account address (hex-encoded)
      - `balance` string: Initial balance in Wei (hex-encoded)
  - `bridge_config` object: Cross-chain bridge configuration for the environment
    - `enabled` boolean: Whether cross-chain bridging is enabled
    - `relay_mode` 'autoRelay' | 'delayedRelay': Bridge relay mode. autoRelay processes bridge messages automatically; delayedRelay holds them until manually triggered.
    - `delay_seconds` integer: Delay in seconds before bridged messages are relayed (used with delayedRelay)

## Response `200`

A successful response.

- EnvEnvironment: Multi-chain environment grouping multiple Virtual Environments across chains
  - `id` string, uuid: Unique identifier of the environment
  - `display_name` string: Display name of the environment
  - `slug` string: URL-safe slug for the environment
  - `description` string: Description of the environment
  - `created_at` string, date-time: Timestamp when the environment was created
  - `updated_at` string, date-time: Timestamp when the environment was last updated
  - `networks` object[]: Network configurations in this environment
    - `id` string, uuid: Unique identifier of this network config
    - `network_id` string: Parent chain network ID
    - `network_name` string: Human-readable network name
    - `network_type` 'vnet' | 'network_mirror': Type of network (Virtual Environment fork or mirror of live network)
    - `block_number` string: Fork block number (hex-encoded)
    - `region` string: Deployment region
    - `chain_config_overrides` object: Chain configuration overrides
      - `chain_id` string
    - `explorer_config` object: Block explorer configuration
      - `enabled` boolean
      - `verification_visibility` 'src' | 'abi' | 'bytecode'
    - `accounts` object[]: Pre-funded accounts on this network
      - `address` string
  - `bridge_config` object: Cross-chain bridge configuration
    - `enabled` boolean
    - `relay_mode` 'autoRelay' | 'delayedRelay'
    - `delay_seconds` integer
  - `active_instance` object: The currently active instance of this environment
    - `id` string, uuid: Unique identifier of the instance
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `bridge_config` object: Bridge configuration for this instance
      - `enabled` boolean
      - `relay_mode` 'autoRelay' | 'delayedRelay'
      - `delay_seconds` integer
    - `vnets` object[]: Virtual Environments in this instance, one per network config
      - `id` string, uuid
      - `display_name` string
      - `slug` string
      - `description` string
      - `status` 'running' | 'stopped' | 'cloning' | 'provision_failed'
      - `created_at` string, date-time
      - `rpcs` object[]: RPC endpoints for this Virtual Environment
        - `name` string
        - `url` string
      - `fork_config` object: Fork configuration for this Virtual Environment
        - `network_id` integer
        - `block_number` string
      - `virtual_network_config` object: Virtual network configuration
        - `chain_config` object
          - `chain_id` integer
        - `base_fee_per_gas` integer
        - `accounts` object[]
          - `address` string
      - `rpc_config` object: RPC endpoint configuration
        - `rpc_name` object
          - `name` string
          - `suffix` string
        - `rpc_persistence_config` object: RPC method persistence configuration
          - `methods` object[]
            - `method` string: RPC method to persist state for
      - `runtime_config` object: Runtime lifecycle configuration
        - `running_duration` integer: Duration in seconds the Virtual Environment will stay running before shutting down
      - `sync_state_config` object: Live chain state synchronization configuration
        - `enabled` boolean
      - `explorer_page_config` object: Block explorer page configuration
        - `enabled` boolean
        - `verification_visibility` 'src' | 'abi' | 'bytecode'

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The resource was not found.
- `429`: The request was rate limited. See the [rate limits](#section/Introduction/Rate-limits) section for the current limits and how request counts expire.
- `500`: Server error.

## Changes

- **2026-08-28** `e512753e74ce`: 6 warning
  - added the new `rid:simulation_draft` enum value to the `error/data/rid` response property for the response status `400`
  - added the new `rid:simulation_draft` enum value to the `error/data/rid` response property for the response status `401`
  - added the new `rid:simulation_draft` enum value to the `error/data/rid` response property for the response status `403`
  - added the new `rid:simulation_draft` enum value to the `error/data/rid` response property for the response status `404`
  - …2 more
- **2026-07-31** `59b67cf882bc`: 3 info
  - api tag `Virtual Environments` added
  - api tag `Environments` removed
  - added the non-success response with the status `429`

[Operation history](https://skmtc.dev/tenderly/apis/tenderly-api/changes/public/v1/account/:accountSlug/project/:projectSlug/environments/post.md)

---

[API](https://skmtc.dev/tenderly/apis/tenderly-api.md) - [All operations](https://skmtc.dev/tenderly/apis/tenderly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tenderly/apis/tenderly-api/revisions/766e383288b3?raw)
