Introduction
The Cerulea API provides programmatic access to all platform capabilities — from deploying blockchain networks and managing smart contracts to querying real-time metrics and configuring governance. The API combines RESTful endpoints for resource management with JSON-RPC 2.0 for direct blockchain interaction.
API Architecture
Cerulea uses a hybrid architecture combining RESTful endpoints for resource management with JSON-RPC 2.0 for blockchain interactions — intuitive REST for infrastructure management, powerful RPC for direct blockchain operations.
- Resource creation and management
- Authentication and access control
- Workspace and project operations
- Webhook registration
- Direct blockchain interaction
- Block and transaction queries
- Contract execution and calls
- Transaction simulation
POST /rpc.Authentication
Cerulea uses a dual authentication system — API keys for server-to-server communication and OAuth 2.0 for user-facing applications and third-party integrations.
API Key Authentication
For server-to-server communication and automated workflows.
Create a new API key with custom scopes and expiration
X-API-Key header for all requests. Never expose API keys in client-side code.OAuth 2.0
For user-facing applications and third-party integrations.
Available Scopes
| Scope | Description |
|---|---|
workspace:read | Read workspace data |
workspace:write | Create and modify workspaces |
blockchain:read | Query blockchain data |
blockchain:write | Deploy and manage blockchains |
blockchain:deploy | Deploy smart contracts |
validator:read | View validators |
validator:write | Manage validators |
governance:read | View governance proposals |
governance:write | Create and vote on proposals |
admin | Full administrative access |
Core REST API
Standard Response Format
All API responses follow a consistent envelope structure.
Pagination
List resources with pagination and sorting
Health Check
Check API health and service status
RPC Methods
JSON-RPC 2.0 endpoint for direct blockchain interactions. All RPC calls are sent as POST /rpc with a JSON body.
Execute a JSON-RPC 2.0 method
Available Methods
blockchain.getBlock— Get block by number or hashblockchain.getTransaction— Get transaction details and statusblockchain.getBalance— Get account balance at a given blocktransaction.send— Broadcast a signed transactiontransaction.simulate— Dry-run a transaction without broadcastingcontract.call— Read-only contract call (no gas)contract.execute— Execute a state-changing contract method
Webhooks
Receive real-time signed payloads when events occur in your blockchain infrastructure. Cerulea delivers HTTP POST requests to your endpoint with a HMAC-SHA256 signature for verification.
Register a new webhook subscription
Webhook Events
| Event Type | Description |
|---|---|
blockchain.block.created | New block added to the chain |
blockchain.transaction.confirmed | Transaction confirmed on-chain |
contract.deployed | Smart contract successfully deployed |
contract.event.emitted | Contract event emitted |
validator.status.changed | Validator joined, left, or changed status |
governance.proposal.created | New governance proposal submitted |
Signature Verification
Workspaces
Organise your blockchain infrastructure into workspaces and projects. A workspace is the top-level container for all resources, team members, and billing.
Create a new workspace
Create a new project within a workspace
dApp Builder
Build complete decentralised applications with no code required. The dApp Builder API composes components into a fully deployable application with frontend, contracts, and backend logic.
Create and configure a new dApp
Available Components
| Component | Description |
|---|---|
token | Fungible or non-fungible tokens |
staking | Token staking mechanism with configurable rewards |
liquidity-pool | DEX liquidity pools |
lending | Lending and borrowing protocol |
governance | DAO governance system |
nft-marketplace | NFT marketplace with royalty support |
auction | Auction mechanism |
multisig | Multi-signature wallet |
Private Blockchains
Deploy and manage custom private blockchain networks with full control over consensus, validators, and runtime configuration.
Create a new private blockchain network
Consensus Mechanisms
proof-of-authority (PoA)— Permissioned validators; standard for enterprise deploymentsproof-of-stake (PoS)— Stake-based validator selectiondelegated-proof-of-stake (DPoS)— Community-elected validator setpbft— Practical Byzantine Fault Tolerance for high-throughput private networksraft— Raft consensus for private networks requiring simple, stable leader election
Smart Contracts
Deploy a smart contract from a managed template
Contract Templates
| Template | Description |
|---|---|
erc20-token | Standard fungible token (ERC-20) |
erc721-nft | Non-fungible token (ERC-721) |
erc1155-multi | Multi-token standard (ERC-1155) |
governance-dao | DAO with on-chain voting |
staking-pool | Token staking with reward distribution |
marketplace | NFT marketplace with royalties |
Validators
Add a new validator to the network
Validator Operations
GET /validators/:id/status— Get real-time validator status and uptimePUT /validators/:id/stake— Update validator stake amountPOST /validators/:id/slash— Apply slash penalty for misbehaviourDELETE /validators/:id— Remove a validator from the active set
Governance
Create a new on-chain governance proposal
Submit a vote on an active proposal
Modules
Enable and configure blockchain modules to add specific capabilities to a deployed network. Modules are provisioned at genesis or via governance upgrade.
Enable a module on your blockchain
Available Modules
| Module | Features |
|---|---|
defi | DeFi protocols — DEX, lending, staking |
nft | NFT minting and marketplace infrastructure |
dao | DAO governance and on-chain voting |
bridge | Cross-chain bridge functionality |
oracle | Price oracle integration (Chainlink-compatible) |
identity | Decentralised identity (DID) framework |
privacy | Zero-knowledge proof support |
storage | Decentralised storage (IPFS-compatible) |
Tokens
Create and configure a new token on a deployed blockchain
Token Standards
ERC20— Fungible tokens; standard for utility and governance tokensERC721— Non-fungible tokens (NFTs); unique digital assetsERC1155— Multi-token standard; fungible and non-fungible in a single contractERC4626— Tokenised vault standard for yield-bearing assets
Monitoring
Get real-time blockchain metrics
Query historical time-series blockchain data
?blockchainId=bc_abc123&metric=transactions&from=2025-02-01&to=2025-02-25&granularity=1hError Handling
Error Response Format
Common Error Codes
| HTTP Code | Error Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid request parameters |
| 401 | UNAUTHORIZED | Invalid or missing authentication |
| 403 | FORBIDDEN | Insufficient permissions for the requested operation |
| 404 | NOT_FOUND | Resource not found |
| 422 | VALIDATION_ERROR | Request body failed validation |
| 429 | RATE_LIMITED | Rate limit exceeded — retry after the indicated delay |
| 500 | INTERNAL_ERROR | Internal server error |