Documentation

Sandbox API Endpoints

Manage your BuildBear sandboxes, create, inspect, snapshot, delete, and list supported networks, etc.

Sandbox Endpoints

1. Create Sandbox

Request
  • Method: POST
  • URL: https://api.buildbear.io/v1/buildbear-sandbox/
  • AUTH: BEARER <YOUR_API_KEY>
Request Body
{
  "chainId": 1,
  "blockNumber": 187654,//optional
  "customChainId": 1234,//optional
  "prefund": [
    "0x1234567890asdf123456789"//optional
  ]
}
Response (200)
{
  "status": "success",
  "sandboxId": "yielding-mysterio-055e0fb6",
  "forkingDetails": {
    "chainId": 1,
    "blockNumber": 187654
  },
  "chainId": 1234,
  "mnemonic": "rally budget soon tomorrow nothing august onion road valid trouble box filter",
  "rpcUrl": "https://rpc.buildbear.io/yielding-mysterio-055e0fb6",
  "explorerUrl": "https://explorer.buildbear.io/yielding-mysterio-055e0fb6",
  "faucetUrl": "https://faucet.buildbear.io/yielding-mysterio-055e0fb6",
  "verificationUrl": "https://api.buildbear.io/v1/api/verify/etherscan/yielding-mysterio-055e0fb6"
}

2. Fetch Sandbox Details

Request
  • Method: GET
  • URL: https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}
    • {sandboxId} - replace this with your BuildBear Sandbox's ID
  • AUTH: BEARER <YOUR_API_KEY>
Request Body
{
  "chainId": 1,
  "blockNumber": 187654,//optional
  "customChainId": 1234,//optional
  "prefund": [
    "0x1234567890asdf123456789"//optional
  ]
}
Response (200)
{
  "sandboxId": "involved-bucky-2fa8d4a8",
  "status": "live",
  "forkingDetails": {
    "chainId": 1,
    "blockNumber": 187654
  },
  "chainId": 1234,
  "mnemonic": "merit ribbon seek noodle life banner real document process surprise destroy armed",
  "rpcUrl": "https://rpc.buildbear.io/involved-bucky-2fa8d4a8",
  "explorerUrl": "https://explorer.buildbear.io/involved-bucky-2fa8d4a8",
  "faucetUrl": "https://faucet.buildbear.io/involved-bucky-2fa8d4a8",
  "verificationUrl": "https://api.buildbear.io/v1/api/verify/etherscan/involved-bucky-2fa8d4a8"
}

3. Get Sandbox Snapshot

Request
  • Method: GET
  • URL: https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}/snapshot
    • {sandboxId} - replace this with your BuildBear Sandbox's ID
  • AUTH: BEARER <YOUR_API_KEY>
Response (200)
[
  {
    "nodeId": "yielding-mysterio-055e0fb6",
    "snapshotId": 1,
    "blockNumber": 187657
  },
  {
    "nodeId": "yielding-mysterio-055e0fb6",
    "snapshotId": 2,
    "blockNumber": 187657
  }
]

4. Delete Sandbox

Request
  • Method: DELETE
  • URL: https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}
    • {sandboxId} - replace this with your BuildBear Sandbox's ID
  • AUTH: BEARER <YOUR_API_KEY>
Response (200)
"Node deleted successfully"

5. Get Available Networks

Request
  • Method: GET
  • URL: https://api.buildbear.io/v1/buildbear-sandbox/chains
  • AUTH: BEARER <YOUR_API_KEY>
Response (200)
[
    {
        "name": "Optimism",
        "id": "Optimism",
        "options": [
            {
                "label": "Optimism Mainnet",
                "value": "10",
                "networkRpc": "https://mainnet.optimism.io"
            }
        ]
    },
    {
        "name": "Arbitrum",
        "id": "Arbitrum",
        "options": [
            {
                "label": "Arbitrum Mainnet",
                "value": "42161",
                "networkRpc": "https://arb1.arbitrum.io/rpc"
            },
            {
                "label": "Arbitrum Sepolia",
                "value": "421614",
                "networkRpc": "https://rpc.ankr.com/arbitrum_sepolia"
            }
        ]
    },
    {
        "name": "Ethereum",
        "id": "Ethereum",
        "options": [
            {
                "label": "Ethereum Mainnet",
                "value": "1",
                "networkRpc": "https://rpc.ankr.com/eth"
            },
            {
                "label": "Sepolia Testnet",
                "value": "11155111",
                "networkRpc": "https://rpc.sepolia.org/"
            },
            {
                "label": "Holesky Testnet",
                "value": "17000",
                "networkRpc": "https://rpc.ankr.com/eth_holesky"
            }
        ]
    },
    {
        "name": "Polygon",
        "id": "Polygon",
        "options": [
            {
                "label": "Polygon Mainnet",
                "value": "137",
                "networkRpc": "https://rpc.ankr.com/polygon"
            },
            {
                "label": "Polygon Amoy",
                "value": "80002",
                "networkRpc": "https://rpc.ankr.com/polygon_amoy"
            }
        ]
    },
    {
        "name": "Arbitrum",
        "id": "Arbitrum",
        "options": [
            {
                "label": "Arbitrum Mainnet",
                "value": "42161",
                "networkRpc": "https://arb1.arbitrum.io/rpc"
            },
            {
                "label": "Arbitrum Sepolia",
                "value": "421614",
                "networkRpc": "https://rpc.ankr.com/arbitrum_sepolia"
            }
        ]
    },
    {
        "name": "Optimism",
        "id": "Optimism",
        "options": [
            {
                "label": "Optimism Mainnet",
                "value": "10",
                "networkRpc": "https://mainnet.optimism.io"
            }
        ]
    },
    {
        "name": "Avalanche",
        "id": "Avalanche",
        "options": [
            {
                "label": "Avalanche Mainnet",
                "value": "43114",
                "networkRpc": "https://rpc.ankr.com/avalanche"
            }
        ]
    },
    {
        "name": "Binance",
        "id": "Binance",
        "options": [
            {
                "label": "Binance Smart Chain",
                "value": "56",
                "networkRpc": "https://rpc.ankr.com/bsc"
            },
            {
                "label": "BSC Testnet",
                "value": "97",
                "networkRpc": "https://little-palpable-seed.bsc-testnet.discover.quiknode.pro/9a49cf2c027187fa38ffe27450ca3e49daa49420"
            }
        ]
    },
    {
        "name": "zkEVM polygon",
        "id": "zkPolygon",
        "options": [
            {
                "label": "Polygon zkEVM",
                "value": "1101",
                "networkRpc": "https://zkevm-rpc.com"
            }
        ]
    },
    {
        "name": "Linea",
        "id": "linea",
        "options": [
            {
                "label": "Linea Mainnet",
                "value": "59144",
                "networkRpc": "https://rpc.linea.build"
            }
        ]
    },
    {
        "name": "Gnosis",
        "id": "gnosis",
        "options": [
            {
                "label": "Gnosis",
                "value": "100",
                "networkRpc": "https://rpc.ankr.com/gnosis"
            }
        ]
    },
    {
        "name": "Omni",
        "id": "omni",
        "options": [
            {
                "label": "Omni Testnet",
                "value": "165",
                "networkRpc": "https://testnet.omni.network"
            }
        ]
    },
    {
        "name": "Base",
        "id": "base",
        "options": [
            {
                "label": "Base Mainnet",
                "value": "8453",
                "networkRpc": "https://rpc.ankr.com/base"
            },
            {
                "label": "Base Sepolia",
                "value": "84532",
                "networkRpc": "https://rpc.ankr.com/base_sepolia"
            }
        ]
    }
]

6. Create Sandbox Snapshot (JSON‐RPC)

Request
  • Method: POST
  • URL: https://rpc.buildbear.io/{sandboxId}
    • {sandboxId} - replace this with your BuildBear Sandbox's ID
  • JSON-RPC Method: evm_snapshot
  • AUTH: BEARER <YOUR_API_KEY>
Request Body
{
  "jsonrpc": "2.0",
  "method": "evm_snapshot",
  "params": [],
  "id": 1
}
Response (200)
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2"
}