Skip to main content
The Tenderly REST API exposes endpoints for creating, listing, and managing Virtual Environments. This page documents the endpoints most often used for Virtual Environment creation. For a walkthrough of how to call them from a script, see Create Virtual Environments via API. For the complete API surface beyond Virtual Environments, see the API Reference.

Authentication

All requests require an X-Access-Key header. Generate a key from Account Settings → Authorization in the Tenderly Dashboard. See API tokens.
X-Access-Key: <your-access-key>

Create a single-network Virtual Environment

POST https://api.tenderly.co/api/v1/account/{account}/project/{project}/vnets

Request body

FieldTypeDescription
slugstringUnique identifier for the Virtual Environment. Used in the RPC URL.
display_namestringHuman-readable name shown in the dashboard.
fork_config.network_idintegerNetwork to fork (chain ID of the parent network).
fork_config.block_numberstring"latest" or a specific block number in hex.
virtual_network_config.chain_config.chain_idintegerChain ID assigned to the Virtual Environment itself.
sync_state_config.enabledbooleanWhether to enable State Sync.
sync_state_config.commitment_levelstringCommitment level for State Sync ("latest" is typical).
explorer_page_config.enabledbooleanWhether to expose a public explorer page.
explorer_page_config.verification_visibilitystring"bytecode", "source", or "abi". Controls what the public explorer reveals about verified contracts.

Example request

request.json
{
  "slug": "my-staging-testnet-25",
  "display_name": "My Staging TestNet",
  "fork_config":            { "network_id": 1, "block_number": "latest" },
  "virtual_network_config": { "chain_config": { "chain_id": 73571 } },
  "sync_state_config":      { "enabled": false, "commitment_level": "latest" },
  "explorer_page_config":   { "enabled": false, "verification_visibility": "bytecode" }
}

Response

Returns the created Virtual Environment, including its RPC URLs:
response.json
{
  "id": "d998eea3-139d-4477-9de2-42f7739362f0",
  "slug": "my-staging-testnet-25",
  "status": "running",
  "fork_config": { "network_id": 1, "block_number": "0x168a5c6" },
  "rpcs": [
    { "url": "https://virtual.mainnet.eu.rpc.tenderly.co/...", "name": "Admin RPC" },
    { "url": "https://virtual.mainnet.eu.rpc.tenderly.co/...", "name": "Public RPC" }
  ]
}
The rpcs array contains both the Admin RPC (full cheatcode access) and the Public RPC (standard JSON-RPC), plus their WebSocket variants.

Create a Multichain Virtual Environment

POST https://api.tenderly.co/api/v1/account/{account}/project/{project}/multivnets
Provisions a Multichain Virtual Environment in one call. Every network in the request becomes a peer in the same Virtual Environment, sharing a single stack_id. This grouping is what enables cross-chain bridging.

Request body

The body has one top-level field, vnets, which is an array. Each entry creates one network inside the Multichain Virtual Environment:
Field (per entry)TypeDescription
slugstringUnique identifier for this network. Used in the RPC URL.
fork_config.network_idintegerNetwork to fork. 1 Ethereum, 42161 Arbitrum, 10 Optimism, 8453 Base, 137 Polygon.
fork_config.block_numberstring"latest" or a specific block number in hex.
virtual_network_config.chain_config.chain_idintegerChain ID for the Virtual Environment. Use the real chain ID or a custom one. By default the dashboard assigns a Virtual Chain ID.

Example request

request.json
{
  "vnets": [
    {
      "slug": "mainnet-staging",
      "fork_config":            { "network_id": 1,     "block_number": "latest" },
      "virtual_network_config": { "chain_config": { "chain_id": 1 } }
    },
    {
      "slug": "arbitrum-staging",
      "fork_config":            { "network_id": 42161, "block_number": "latest" },
      "virtual_network_config": { "chain_config": { "chain_id": 42161 } }
    },
    {
      "slug": "base-staging",
      "fork_config":            { "network_id": 8453,  "block_number": "latest" },
      "virtual_network_config": { "chain_config": { "chain_id": 8453 } }
    }
  ]
}

Response

Returns a stack_id (the Multichain Virtual Environment identifier) and an array of Virtual Environment objects, each with its own RPC endpoints:
response.json
{
  "stack_id": "b419b1c3-6b11-4670-a88b-d49325347558",
  "created_at": "2025-10-22T20:19:49.968Z",
  "vnets": [
    {
      "id": "d998eea3-139d-4477-9de2-42f7739362f0",
      "slug": "mainnet-staging",
      "status": "running",
      "fork_config": { "network_id": 1, "block_number": "0x168a5c6" },
      "rpcs": [
        { "url": "https://virtual.mainnet.eu.rpc.tenderly.co/...", "name": "Admin RPC" },
        { "url": "https://virtual.mainnet.eu.rpc.tenderly.co/...", "name": "Public RPC" }
      ]
    }
  ]
}

See also