API + Auth
Endpoints
POST /frontdoor/auth/connectGET /frontdoor/auth/sessionPOST /frontdoor/auth/logoutPOST /v1/ingestGET /v1/ingest/:idPOST /v1/retrievePOST /v1/citationsGET /v1/credits/:agentIdGET /v1/credits/:agentId/escrowGET /v1/economy/dashboard/:agentIdPOST /v1/economy/convert/previewPOST /v1/economy/convertPOST /v1/economy/tip-platformPOST /v1/webhooks/paddle/conversionsGET /v1/bundlesPOST /v1/bundles/purchaseGET /v1/home/:agentId/primitivesPOST /v1/home/:agentId/primitivesGET /v1/shield/capabilitiesGET /v1/shield/trust/publishersPOST /v1/shield/trust/publishersGET /v1/shield/trust/digestsPOST /v1/shield/trust/digestsPOST /v1/shield/trust/digests/revokeGET /v1/shield/serversPOST /v1/shield/serversPOST /v1/shield/servers/:serverId/statusPOST /v1/shield/approvals/proposePOST /v1/shield/approvals/:approvalRequestId/resolveGET /v1/shield/approvals/:approvalRequestIdGET /v1/shield/kill-switchesPOST /v1/shield/kill-switchesDELETE /v1/shield/kill-switches/:killSwitchIdGET /v1/shield/sampling-policiesPOST /v1/shield/sampling-policiesGET /v1/shield/ui-integrity-sessionsPOST /v1/shield/ui-integrity-sessionsGET /v1/shield/incident-drillsPOST /v1/shield/incident-drillsGET /healthzGET /readyzGET /build-info
Authentication model
VaultCrux uses tenant-scoped API keys persisted in vaultcrux.api_keys.
Frontdoor uses same-origin session auth:
POST /frontdoor/auth/connectvalidates tenant + API key, then sets an HttpOnly session cookie.GET /frontdoor/auth/sessionreturns active session state.POST /frontdoor/auth/logoutrevokes current session and clears cookie.
Session cookies are signed and bound to vaultcrux.frontdoor_sessions rows.
Canonical request headers for /v1/*:
x-tenant-idx-api-keyx-idempotency-keyfor mutation callsx-shield-approval-tokenfor approved shield-gated mutation calls
Exception:
POST /v1/webhooks/paddle/conversionsusesx-paddle-signatureverification and is not tenant-key authenticated.
Canonical request headers for MCP /rpc, /stream, /sse, and /capabilities:
x-tenant-idx-api-keyx-idempotency-keyfor mutating tools (tip_platform,convert_credits_to_discount,purchase_bundle)x-shield-approval-tokenwhen approval workflow returns an approval token
Header-first compatibility window
- Production (
NODE_ENV=production):x-tenant-idandx-api-keyare required. - Exception for Frontdoor runtime: when valid frontdoor session cookie is present,
/v1/*accepts cookie-backed auth without sendingx-api-keyfrom the browser. - Non-production: legacy tenant values in body/query are temporarily allowed when
ALLOW_LEGACY_TENANT_FIELDS=true. - If header tenant and body/query tenant disagree, API returns
403 Forbidden. - For
POST /v1/retrieveandPOST /v1/citations,tenantIdin body is optional when tenant context is already resolved by header/session auth.
Example
bash
curl -X POST http://localhost:14333/v1/retrieve \
-H "content-type: application/json" \
-H "x-tenant-id: tenant-a" \
-H "x-api-key: example-key" \
-d '{
"query": "How do we keep replay handlers idempotent?",
"limit": 5,
"lane": "audit"
}'OpenAPI
Generated from VaultCrux/apps/api:
bash
cd ../VaultCrux
pnpm openapi:emit
cd ../VaultCrux-Docs
pnpm sync:openapiMCP tool surface
VaultCrux/apps/mcp exposes JSON-RPC 2.0 methods:
query_vaultget_credit_balanceget_credit_escrowget_economy_dashboardconvert_credits_to_discountget_subscription_discount_previewtip_platformbrowse_bundlespurchase_bundle
Transport options:
POST /rpcfor standard JSON-RPC request/responsePOST /streamfor streamable HTTP (application/x-ndjson)GET /ssefor SSE capability/heartbeat streamstdiobridge (pnpm --filter @vaultcrux/mcp stdio)

