curl --request POST \
--url https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments \
--header 'Content-Type: application/json' \
--header 'X-Access-Key: <api-key>' \
--data '
{
"display_name": "My Multi-Chain Environment",
"network_configs": [
{
"network_id": "1",
"block_number": "0x12c50f0",
"chain_config_overrides": {
"chain_id": "1"
},
"explorer_config": {
"enabled": true,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"balance": "0xde0b6b3a7640000"
}
]
}
],
"slug": "my-multi-chain-env",
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
}
}
'import requests
url = "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments"
payload = {
"display_name": "My Multi-Chain Environment",
"network_configs": [
{
"network_id": "1",
"block_number": "0x12c50f0",
"chain_config_overrides": { "chain_id": "1" },
"explorer_config": {
"enabled": True,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"balance": "0xde0b6b3a7640000"
}
]
}
],
"slug": "my-multi-chain-env",
"bridge_config": {
"enabled": True,
"relay_mode": "autoRelay",
"delay_seconds": 0
}
}
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'My Multi-Chain Environment',
network_configs: [
{
network_id: '1',
block_number: '0x12c50f0',
chain_config_overrides: {chain_id: '1'},
explorer_config: {enabled: true, verification_visibility: 'abi'},
accounts: [
{
address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
balance: '0xde0b6b3a7640000'
}
]
}
],
slug: 'my-multi-chain-env',
bridge_config: {enabled: true, relay_mode: 'autoRelay', delay_seconds: 0}
})
};
fetch('https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'My Multi-Chain Environment',
'network_configs' => [
[
'network_id' => '1',
'block_number' => '0x12c50f0',
'chain_config_overrides' => [
'chain_id' => '1'
],
'explorer_config' => [
'enabled' => true,
'verification_visibility' => 'abi'
],
'accounts' => [
[
'address' => '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
'balance' => '0xde0b6b3a7640000'
]
]
]
],
'slug' => 'my-multi-chain-env',
'bridge_config' => [
'enabled' => true,
'relay_mode' => 'autoRelay',
'delay_seconds' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments"
payload := strings.NewReader("{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments")
.header("X-Access-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"display_name": "My Multi-Chain Environment",
"slug": "my-multi-chain-env",
"description": "A multi-chain test environment spanning Mainnet and Optimism",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:00:00Z",
"networks": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"network_id": "1",
"network_name": "Mainnet",
"network_type": "vnet",
"block_number": "0x12c50f0",
"region": "eu",
"chain_config_overrides": {
"chain_id": "1"
},
"explorer_config": {
"enabled": true,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
}
]
}
],
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
},
"active_instance": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:00:00Z",
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
},
"vnets": [
{
"id": "4010f442-c4d9-407d-aba1-7276e3312998",
"display_name": "My Vnet 123",
"slug": "my-vnet-123",
"description": "This is a description of my Vnet",
"status": "running",
"created_at": "2024-01-15T10:30:00Z",
"rpcs": [
{
"name": "Admin RPC",
"url": "https://virtual.mainnet.rpc.tenderly.co/tenderly/my-project/my-multi-chain-env-9e7edf81"
}
],
"fork_config": {
"network_id": 1,
"block_number": "0x12c50f0"
},
"virtual_network_config": {
"chain_config": {
"chain_id": 1
},
"base_fee_per_gas": 1,
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
}
]
},
"rpc_config": {
"rpc_name": {
"name": "e2e-tests-example",
"suffix": "9e7edf81-f6c2-49c2-855f-242ff9a6b09a"
},
"rpc_persistence_config": {
"methods": [
{
"method": "tenderly_simulateTransaction"
}
]
}
},
"runtime_config": {
"running_duration": 3600
},
"sync_state_config": {
"enabled": true
},
"explorer_page_config": {
"enabled": true,
"verification_visibility": "abi"
}
}
]
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Create Environment
Create a new multi-chain environment with Virtual Environments across specified networks
curl --request POST \
--url https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments \
--header 'Content-Type: application/json' \
--header 'X-Access-Key: <api-key>' \
--data '
{
"display_name": "My Multi-Chain Environment",
"network_configs": [
{
"network_id": "1",
"block_number": "0x12c50f0",
"chain_config_overrides": {
"chain_id": "1"
},
"explorer_config": {
"enabled": true,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"balance": "0xde0b6b3a7640000"
}
]
}
],
"slug": "my-multi-chain-env",
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
}
}
'import requests
url = "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments"
payload = {
"display_name": "My Multi-Chain Environment",
"network_configs": [
{
"network_id": "1",
"block_number": "0x12c50f0",
"chain_config_overrides": { "chain_id": "1" },
"explorer_config": {
"enabled": True,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"balance": "0xde0b6b3a7640000"
}
]
}
],
"slug": "my-multi-chain-env",
"bridge_config": {
"enabled": True,
"relay_mode": "autoRelay",
"delay_seconds": 0
}
}
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'My Multi-Chain Environment',
network_configs: [
{
network_id: '1',
block_number: '0x12c50f0',
chain_config_overrides: {chain_id: '1'},
explorer_config: {enabled: true, verification_visibility: 'abi'},
accounts: [
{
address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
balance: '0xde0b6b3a7640000'
}
]
}
],
slug: 'my-multi-chain-env',
bridge_config: {enabled: true, relay_mode: 'autoRelay', delay_seconds: 0}
})
};
fetch('https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'My Multi-Chain Environment',
'network_configs' => [
[
'network_id' => '1',
'block_number' => '0x12c50f0',
'chain_config_overrides' => [
'chain_id' => '1'
],
'explorer_config' => [
'enabled' => true,
'verification_visibility' => 'abi'
],
'accounts' => [
[
'address' => '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
'balance' => '0xde0b6b3a7640000'
]
]
]
],
'slug' => 'my-multi-chain-env',
'bridge_config' => [
'enabled' => true,
'relay_mode' => 'autoRelay',
'delay_seconds' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments"
payload := strings.NewReader("{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments")
.header("X-Access-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"My Multi-Chain Environment\",\n \"network_configs\": [\n {\n \"network_id\": \"1\",\n \"block_number\": \"0x12c50f0\",\n \"chain_config_overrides\": {\n \"chain_id\": \"1\"\n },\n \"explorer_config\": {\n \"enabled\": true,\n \"verification_visibility\": \"abi\"\n },\n \"accounts\": [\n {\n \"address\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"balance\": \"0xde0b6b3a7640000\"\n }\n ]\n }\n ],\n \"slug\": \"my-multi-chain-env\",\n \"bridge_config\": {\n \"enabled\": true,\n \"relay_mode\": \"autoRelay\",\n \"delay_seconds\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"display_name": "My Multi-Chain Environment",
"slug": "my-multi-chain-env",
"description": "A multi-chain test environment spanning Mainnet and Optimism",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:00:00Z",
"networks": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"network_id": "1",
"network_name": "Mainnet",
"network_type": "vnet",
"block_number": "0x12c50f0",
"region": "eu",
"chain_config_overrides": {
"chain_id": "1"
},
"explorer_config": {
"enabled": true,
"verification_visibility": "abi"
},
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
}
]
}
],
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
},
"active_instance": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:00:00Z",
"bridge_config": {
"enabled": true,
"relay_mode": "autoRelay",
"delay_seconds": 0
},
"vnets": [
{
"id": "4010f442-c4d9-407d-aba1-7276e3312998",
"display_name": "My Vnet 123",
"slug": "my-vnet-123",
"description": "This is a description of my Vnet",
"status": "running",
"created_at": "2024-01-15T10:30:00Z",
"rpcs": [
{
"name": "Admin RPC",
"url": "https://virtual.mainnet.rpc.tenderly.co/tenderly/my-project/my-multi-chain-env-9e7edf81"
}
],
"fork_config": {
"network_id": 1,
"block_number": "0x12c50f0"
},
"virtual_network_config": {
"chain_config": {
"chain_id": 1
},
"base_fee_per_gas": 1,
"accounts": [
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
}
]
},
"rpc_config": {
"rpc_name": {
"name": "e2e-tests-example",
"suffix": "9e7edf81-f6c2-49c2-855f-242ff9a6b09a"
},
"rpc_persistence_config": {
"methods": [
{
"method": "tenderly_simulateTransaction"
}
]
}
},
"runtime_config": {
"running_duration": 3600
},
"sync_state_config": {
"enabled": true
},
"explorer_page_config": {
"enabled": true,
"verification_visibility": "abi"
}
}
]
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Authorizations
An API key is a token that a client provides when making API calls. Send it as the X-Access-Key request header on any endpoint:
curl '<API_ENDPOINT>' \ -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \ ...
Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Account ID or slug
Project ID or slug
Body
Environment configuration
Request body for creating a new multi-chain environment
Display name of the environment
"My Multi-Chain Environment"
List of network configurations for this environment
Show child attributes
Show child attributes
URL-safe slug for the environment. Auto-generated from display_name if omitted.
"my-multi-chain-env"
Cross-chain bridge configuration for the environment
Show child attributes
Show child attributes
Response
A successful response.
Multi-chain environment grouping multiple Virtual Environments across chains
Unique identifier of the environment
"d4e5f6a7-b8c9-0123-def1-234567890123"
Display name of the environment
"My Multi-Chain Environment"
URL-safe slug for the environment
"my-multi-chain-env"
Description of the environment
"A multi-chain test environment spanning Mainnet and Optimism"
Timestamp when the environment was created
"2024-01-15T10:30:00Z"
Timestamp when the environment was last updated
"2024-01-15T12:00:00Z"
Network configurations in this environment
Show child attributes
Show child attributes
Cross-chain bridge configuration
Show child attributes
Show child attributes
The currently active instance of this environment
Show child attributes
Show child attributes
Was this page helpful?