Signed sessions
Authentication uses signed, httpOnly session cookies with role-scoped capabilities.
Developers
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.
POST /api/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Authentication uses signed, httpOnly session cookies with role-scoped capabilities.
All API route handlers run on the Node runtime with typed request validation.
MCP exposes discovery and tenant tools through JSON-RPC 2.0 at one endpoint.
Tenant API
All routes below require a signed session. Mutations require the listed capability and a same-origin Origin header.
| Method | Route | Capability | Purpose |
|---|---|---|---|
| GET | /api/v1/state | read | Tenant snapshot, public configuration, and session capabilities |
| POST | /api/v1/campaigns | campaign:write | Compile a spec, create a campaign, and request approval |
| POST | /api/v1/approvals | approval:decide | Approve or reject; approval signs a Spend Warrant |
| POST | /api/v1/warrants/verify | read | Verify signature, expiry, tenant, campaign hash, cap, and halt |
| POST | /api/v1/governance/halt | governance:halt | Emergency halt or resume by scope |
| POST | /api/v1/agent/chat | agent:chat | Metered agent chat and configured autonomy |
| POST | /api/v1/creative/generate | creative:write | Metered, brand-checked creative generation |
| POST | /api/v1/onboarding | onboarding:write | Business profile and budget audit |
| POST | /api/v1/bidder/openrtb | read | OpenRTB 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
Discovery methods are public by default when MCP is enabled. tools/call requires an authenticated session and the MCP tools capability.
Request example
This discovery request does not execute a tenant tool. Use the same JSON-RPC envelope when initializing or inspecting resources.
curl -X POST http://localhost:3000/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'Open the console to review the developer panel, readiness gates, models, and MCP playground.