Skip to Content
Endpoint Reference

Endpoint Reference

This page lists the shipped HTTP routes in apps/api. It separates external agent/API-key routes from recruiter UI routes and public participant routes.

The generated OpenAPI contract for customer and partner integrations is available at /openapi.json on the API host, with Swagger UI at /docs. That generated contract is intentionally scoped to the /v1/api API-key routes.

Auth models

AuthUsed byHeaders
API keyExternal agents, partner systems, CLI reference workflowAuthorization: Bearer <key> or x-api-key: <key>
Clerk tenant sessionRecruiter UI and tenant admin screensClerk session cookies/JWT handled by the app
Public tokenCandidate intake, referee conversations, shared reportsToken in the path
NoneHealth and metadataNone

Public API-key routes

Base path: /v1/api

MethodPathScopePurpose
GET/reference-requests/:requestIdreferences:readRead a reference request for the API-key tenant
POST/agentreferences:readAsk the OpenRouter-backed Veref workspace agent
GET/ops/feedreferences:readRead the tenant ops feed through an API key
POST/ops/messagesreferences:writeCreate an ops coordination message through an API key
POST/reference-requestsreferences:writeStart a reference-check workflow
POST/reference-requests/:requestId/lifecyclereferences:writeAdvance reference-request lifecycle state
POST/reference-requests/:requestId/valuation/draftvaluations:writeGenerate or preview valuation draft
POST/reference-requests/:requestId/valuation/approvevaluations:writeApprove valuation/report package
POST/reference-requests/:requestId/sharereports:writeCreate a customer share link

The API key actor supplies tenantId and recruiterId; callers should not rely on body-supplied identity fields.

API key management routes

Base path: /v1/tenants/:tenantId/api-keys

These routes require a recruiter Clerk tenant session.

MethodPathPurpose
POST/Create a new API key and return the plaintext once
GET/List API keys for the tenant
DELETE/:apiKeyIdRevoke an API key
GET/scopesList supported API key scopes

Recruiter tenant routes

Base path: /v1/tenants

These routes require a recruiter Clerk tenant session.

MethodPathPurpose
GET/:tenantId/workspaceRecruiter workspace snapshot
GET/:tenantId/candidatesList candidates
POST/:tenantId/candidatesCreate candidate
PATCH/:tenantId/candidates/:candidateId/profileUpdate candidate profile
DELETE/:tenantId/candidates/:candidateIdSoft-delete candidate
GET/:tenantId/candidates/:candidateIdCandidate workspace detail
POST/:tenantId/reference-requestsCreate reference request from recruiter UI
GET/:tenantId/reference-requests/:requestIdRead reference request
POST/:tenantId/reference-requests/:requestId/lifecycleAdvance reference lifecycle
GET/:tenantId/reference-requests/:requestId/reviewReview view for a request
GET/:tenantId/reference-requests/:requestId/activityRequest activity feed
GET/:tenantId/reference-requests/:requestId/milestonesRequest milestone status
GET/:tenantId/reference-reports/:referenceRequestIdReport lifecycle state
POST/:tenantId/reference-reports/:referenceRequestId/draftDraft report
POST/:tenantId/reference-reports/:referenceRequestId/approveApprove report
POST/:tenantId/reference-reports/:referenceRequestId/shareCreate share link
POST/:tenantId/reference-reports/:referenceRequestId/revokeRevoke share link
GET/:tenantId/reference-reports/:referenceRequestId/pdfExport approved PDF
GET/:tenantId/dashboardTenant dashboard preview
PATCH/:tenantId/trust-signals/:signalIdReview trust signal
GET/:tenantId/ops/feedTenant ops feed
POST/:tenantId/ops/messagesCreate ops message
POST/:tenantId/ops/agentAsk the recruiter workspace agent
POST/:tenantId/flagsSet tenant feature flag
POST/:tenantId/passport-reference-permissionsAsk a candidate to reuse collected reference details
GET/:tenantId/onboarding-statusRead onboarding status
PATCH/:tenantId/onboardingMark onboarding complete
GET/:tenantId/recruiters/:recruiterId/preferencesRead recruiter preferences
PATCH/:tenantId/recruiters/:recruiterId/preferencesUpdate recruiter preferences

Public participant routes

These routes use path tokens issued by the reference workflow.

MethodPathPurpose
GET/v1/public/intake/:tokenResolve candidate intake token
POST/v1/public/intake/:token/messagesStream candidate intake agent response over SSE
POST/v1/public/intake/:token/completeComplete candidate intake
POST/v1/public/intake/:token/abandonAbandon candidate intake
GET/v1/public/referee/:tokenResolve referee token
POST/v1/public/referee/:token/messagesStream referee agent response over SSE
POST/v1/public/referee/:token/completeComplete referee conversation
POST/v1/public/referee/:token/abandonAbandon referee conversation
GET/v1/public/reference-reports/:tokenOpen shared reference report
GET/v1/public/reference-reports/:token/pdfDownload shared report PDF

Integrations and webhooks

MethodPathAuthPurpose
POST/v1/webhooks/clerkClerk webhook signatureClerk tenant/recruiter provisioning

Health and metadata

MethodPathAuthPurpose
GET/healthNoneAPI health check
GET/v1/meta/stackNoneStack/runtime metadata
GET/v1/onboarding/stateClerk request authPublic onboarding state

Agent equivalence

The recruiter app chat, the local CLI, Claude, GPT, Codex, and partner agents should be treated as different clients for the same workflow:

  1. Start reference check through POST /v1/api/reference-requests or veref references start.
  2. Use launchMode: "candidate_intake" for candidate-led permission and referee collection, or launchMode: "manual_references" when referee contacts are already known.
  3. Manual-reference contacts must include both email and phone; tenant defaults normalize local phone numbers to E.164.
  4. Candidate and referee participants continue through public token routes.
  5. Agent or recruiter advances lifecycle only when needed.
  6. Draft, approve, and share reports through the report endpoints.
  7. Use ops endpoints for coordination, not as workflow state.

Ops feed and message routes persist coordination messages in Prisma. They only return preview data when VEREF_ENABLE_PREVIEW_FALLBACK=1 is explicitly set for development.