API + Auth
Endpoints
POST /frontdoor/auth/connectGET /frontdoor/auth/sessionPOST /frontdoor/auth/logoutPOST /v1/agents/registerGET /v1/agents/me/sponsor-requestPOST /v1/agents/:agentPrincipalId/sponsorPOST /v1/org/bootstrap-ownerPOST /v1/org/inviteGET /v1/org/seatsPUT /v1/org/seats/:idDELETE /v1/org/seats/:idPOST /v1/org/accept-invitePOST /v1/ingestGET /v1/ingest/:idPOST /v1/retrievePOST /v1/citationsGET /v1/proof/answers/:answerId/receiptGET /v1/proof/receipts/:receiptId/proofpackPOST /v1/proof/jobsGET /v1/proof/jobs/:idGET /v1/proof/jobs/:id/chunksGET /v1/proof/jobs/:id/receiptGET /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/home/:agentId/journalGET /v1/home/:agentId/stale-pinsGET /v1/home/:agentId/session-contextPOST /v1/home/:agentId/journal/eventsPOST /v1/feedback/requestsGET /v1/feedback/requestsPOST /v1/feedback/requests/:id/votePOST /v1/feedback/requests/:id/acknowledgePOST /v1/feedback/requests/:id/archivePOST /v1/feedback/requests/:id/shipPOST /v1/feedback/revenue/declarationsGET /v1/feedback/revenue/summaryGET /v1/feedback/surveys/currentPOST /v1/feedback/surveys/current/responsesPOST /v1/feedback/review/requests/:idPOST /v1/feedback/review/declarations/:idPOST /v1/watchesGET /v1/watchesGET /v1/watches/:id/alertsDELETE /v1/watches/:idGET /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 /metricsGET /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 (authType=api_key).POST /v1/org/accept-inviteaccepts a manual seat invite token and sets an HttpOnly seat session cookie (authType=seat).GET /frontdoor/auth/sessionreturns active session state includingauthTypeand seat payload when applicable.POST /frontdoor/auth/logoutrevokes either API-key or seat sessions and clears cookie.
Session cookies are signed and bound to one of:
vaultcrux.frontdoor_sessions(API-key browser sessions)vaultcrux.tenant_seat_sessions(seat invitee browser sessions)
Self-signup sessions are signed bearer tokens backed by:
vaultcrux.self_signup_sessionsvaultcrux.self_registered_agents
Canonical request headers for /v1/*:
x-tenant-idx-api-keyx-idempotency-keyfor mutation callsx-shield-approval-tokenfor approved shield-gated mutation calls
Self-signup bearer auth (no API key header required):
Authorization: Bearer vcrx_self_<signed_session_token>x-tenant-idis optional; when present, it must match resolved self-signup tenant context.
Exception:
POST /v1/webhooks/paddle/conversionsusesx-paddle-signatureverification and is not tenant-key authenticated.POST /v1/org/accept-inviteis public token-based (no tenant header/api key required).
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,submit_feature_request,vote_feature_request,declare_revenue_willingness,submit_feedback_survey,respond_to_survey)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.
Self-signup constraints
POST /v1/agents/registeris public and feature-gated byFEATURE_SELF_SIGNUP.- Pre-sponsor self-signup sessions are read-only and scoped to discovery flows.
- Pre-sponsor retrieval uses a non-renewable credit budget and daily query caps.
- Sponsor claim endpoint (
POST /v1/agents/:agentPrincipalId/sponsor) requires an authenticated frontdoor session. - Authenticated self-signup responses include:
x-vaultcrux-credits-remainingx-vaultcrux-rate-limit-daily-remainingx-vaultcrux-sponsor-requiredx-vaultcrux-upgrade-url
Seat-session RBAC
owner: full access.admin: seat management + product routes, but no/v1/shield/*admin paths.member: product routes only (/v1/ingest,/v1/retrieve,/v1/proof,/v1/watches,/v1/credits,/v1/economy,/v1/home,/v1/citations,/v1/bundles,/v1/feedback).viewer: retrieve-only mutation posture (POST /v1/retrieve+ continuity/home reads viaGET /v1/home/*; watch routes are blocked).
API-key and frontdoor API-key sessions remain owner-equivalent for backward compatibility during the Sprint 2 bridge scope.
Agent continuity surface
- Feature-gated routes:
GET /v1/home/:agentId/journalGET /v1/home/:agentId/stale-pinsGET /v1/home/:agentId/session-contextPOST /v1/home/:agentId/journal/events
- When disabled, these routes return
412 FeatureDisabled. - Adapter ingress route (
POST /v1/home/:agentId/journal/events) only accepts:watch_alertproof_completedschema_adopted
Watch surface
- Feature-gated routes:
POST /v1/watchesGET /v1/watchesGET /v1/watches/:id/alertsDELETE /v1/watches/:id
- When disabled, these routes return
412 FeatureDisabled. - Watch surfaces require Pro/Team tier; Free/Starter returns
403 Forbidden. targetType=artefactis accepted on create and normalized toartifact.
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
MCP tool surface
VaultCrux/apps/mcp exposes JSON-RPC 2.0 methods:
register_agent(public via/rpc/public)request_sponsor(public via/rpc/public, requiressession_token)query_vaultget_credit_balanceget_credit_escrowget_economy_dashboardconvert_credits_to_discountget_subscription_discount_previewtip_platformbrowse_bundlespurchase_bundleproof_documentget_proof_statusget_proof_chunksget_proof_receiptget_proofpackget_journalget_stale_pinsget_session_contextwatch_answerunwatch_answerget_watchesget_watch_alertssubmit_feature_requestvote_feature_requestget_feature_requestsdeclare_revenue_willingnesssubmit_feedback_surveyrespond_to_survey
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)

