Skip to content
Docs

Requests and responses

JSON success envelope

Success responses wrap the payload in a top-level data object.

Overview

Successful Cloud JSON responses wrap the payload in data. HTTP status is in the 2xx range (typically 200). Raw HTTP callers must read response.data; SDKs unwrap it for you.

json
{
  "data": {
    /* endpoint-specific payload */
  }
}

Example — chains

bash
curl -sS "https://blockchain.gray3.io/v1/chains" \
  -H "X-Gray-Project-Id: $GRAY_PROJECT_ID" \
  -H "Authorization: Bearer $GRAY_SECRET_KEY"
json
{
  "data": {
    "items": [
      {
        "id": "ethereum",
        "name": "Ethereum",
        "family": "evm",
        "pathSlots": 3,
        "native": { "symbol": "ETH", "name": "Ether", "decimals": 18 },
        "explorer": { "url": "https://etherscan.io" }
      }
    ]
  }
}

Exceptions

  • GET /health — still uses the { data } envelope (ok, service)
  • Monero daemon proxy (/v1/monero/daemon/*) returns raw monerod bodies—not the Gray3 envelope. See the Call the daemon proxy.

Useful response headers