Skip to content
ROIzilla

Developers

Build on the workflow. Respect the authority boundary.

Use versioned tenant APIs and JSON-RPC 2.0 MCP methods to inspect state, compile campaigns, verify warrants, and operate inside role-based capabilities.

Tenant API mutations require a signed session, the relevant capability, and same-origin checks.

MCP discovery
POST /api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Signed sessions

Authentication uses signed, httpOnly session cookies with role-scoped capabilities.

Node runtime

All API route handlers run on the Node runtime with typed request validation.

Structured protocol

MCP exposes discovery and tenant tools through JSON-RPC 2.0 at one endpoint.

Tenant API

Versioned routes with explicit capabilities.

All routes below require a signed session. Mutations require the listed capability and a same-origin Origin header.

ROIzilla tenant API endpoints
MethodRouteCapabilityPurpose
GET/api/v1/statereadTenant snapshot, public configuration, and session capabilities
POST/api/v1/campaignscampaign:writeCompile a spec, create a campaign, and request approval
POST/api/v1/approvalsapproval:decideApprove or reject; approval signs a Spend Warrant
POST/api/v1/warrants/verifyreadVerify signature, expiry, tenant, campaign hash, cap, and halt
POST/api/v1/governance/haltgovernance:haltEmergency halt or resume by scope
POST/api/v1/agent/chatagent:chatMetered agent chat and configured autonomy
POST/api/v1/creative/generatecreative:writeMetered, brand-checked creative generation
POST/api/v1/onboardingonboarding:writeBusiness profile and budget audit
POST/api/v1/bidder/openrtbreadOpenRTB benchmark or single-auction simulation

Authentication routes are available at /api/auth/login, /api/auth/logout, and /api/auth/session. The machine-readable specification is at /openapi.json.

Model Context Protocol

Discover publicly. Call tools with a session.

Discovery methods are public by default when MCP is enabled. tools/call requires an authenticated session and the MCP tools capability.

initializepingtools/listresources/listresources/readtools/call
Available tools
  • roizilla.business.profile
  • roizilla.pricing.calculate
  • roizilla.channel.registry
  • roizilla.campaign.list
  • roizilla.campaign.compile
  • roizilla.bid.simulate
  • roizilla.warrant.verify
  • roizilla.usage.summary
  • roizilla.governance.halt_status

Request example

List the available MCP tools.

This discovery request does not execute a tenant tool. Use the same JSON-RPC envelope when initializing or inspecting resources.

Review integration boundaries
curl -X POST http://localhost:3000/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Before a live integration

  • Replace development secrets and seeded credentials.
  • Keep provider execution gates disabled until intentionally configured.
  • Test approval roles, tenant isolation, halt behavior, and failure handling.

Inspect the developer surface inside the product.

Open the console to review the developer panel, readiness gates, models, and MCP playground.