Documentation

Sandbox API

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

Authorization

All requests must include your API Key as a Bearer Token in the Authorization header for authentication.


Create a Sandbox

Properties

POST
https://api.buildbear.io/v1/buildbear-sandbox
body
chainId(integer)
RequiredThe ID of the blockchain to fork
blockNumber(integer)
OptionalThe block number to fork from
customChainId(integer)
OptionalA custom chain ID for the sandbox
prefund(array)
OptionalA list of addresses to prefund in the sandbox
headers
Authorization(string)
RequiredBearer Token
Accept(string)
Requiredapplication/json
Content-Type(string)
Requiredapplication/json

Request Example

curl -X 'POST' \
  'https://api.buildbear.io/v1/buildbear-sandbox' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "chainId": 1,
    "blockNumber": 187654,
    "customChainId": 1234,
    "prefund": [
      "0x1234567890asdf123456789"
    ]
  }'

Response

A successful response will return a JSON object containing the sandbox details.

{
  "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"
}

Fetch Sandbox Details

Properties

GET
https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}
segments
sandboxId(string)
RequiredThe ID of the sandbox to query
headers
Authorization(string)
RequiredBearer Token
Accept(string)
Requiredapplication/json

Request Example

curl -X 'GET' \
  'https://api.buildbear.io/v1/buildbear-sandbox/involved-bucky-2fa8d4a8' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

A successful response will return a JSON object containing the sandbox details for the given Sandbox-ID.

{
  "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"
}

Get Sandbox Snapshot

Properties

GET
https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}/snapshot
segments
sandboxId(string)
RequiredThe ID of the sandbox to query
headers
Authorization(string)
RequiredBearer Token
Accept(string)
Requiredapplication/json

Request Example

curl -X 'GET' \
  'https://api.buildbear.io/v1/buildbear-sandbox/involved-bucky-2fa8d4a8/snapshot'\   
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

A successful response will return a JSON object containing the sandbox details.

[
  {
    "nodeId": "yielding-mysterio-055e0fb6",
    "snapshotId": 1,
    "blockNumber": 187657
  },
  {
    "nodeId": "yielding-mysterio-055e0fb6",
    "snapshotId": 2,
    "blockNumber": 187660
  }
]

Delete a Sandbox

Properties

DELETE
https://api.buildbear.io/v1/buildbear-sandbox/{sandboxId}
segments
sandboxId(string)
RequiredThe ID of the sandbox to query
headers
Authorization(string)
RequiredBearer Token
Accept(string)
Requiredapplication/json

Request Example

curl -X 'DELETE' \
  'https://api.buildbear.io/v1/buildbear-sandbox/yielding-mysterio-055e0fb6' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

A successful response will confirm the deletion of the specified sandbox.

"Node deleted successfully"

Get Available Networks

Properties

GET
https://api.buildbear.io/v1/buildbear-sandbox/chains
headers
Authorization(string)
RequiredBearer Token
Accept(string)
Requiredapplication/json

Request Example

curl -X 'GET' \
  'https://api.buildbear.io/v1/buildbear-sandbox/chains' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

A successful response will return a JSON object containing the supported chains.

[
  {
    "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": "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"
      }
    ]
  }
]