DUTY GRAPH · ADVISOR ENABLEMENT

Release 0.3 · Hosted advisor pilot · September 2026

Implemented API reference

Release 0.3. This inventory is generated from server route declarations. It describes 81 implemented method/path declarations, not the larger production target. The report format parameter accepts preview or download. Unknown API routes return a structured 404 from the running server.

Transport and authentication

The browser and API share one origin (localhost or the production Vercel URL). API sessions use the HttpOnly dg_session cookie. Sign-in/register/enrollment return a session-bound CSRF token; authenticated changes require X-CSRF-Token. Commands also require a unique Idempotency-Key of at most 128 characters. Reusing a key with identical actor/path/content returns the saved result; changed content conflicts. Invitation bearer URLs are redacted from saved receipts.

Authentication and invitation entry points have a production-default limit of 40 requests per 15 minutes per IP. Hosted limits use a PostgreSQL counter shared by function instances; local limits are per process. Provider-key settings share this limiter. Business routes enforce the server actor and tenant context; no request may select a different tenant or role. Advisor routes manage companies within that tenant. Participant routes and assets enforce the assigned person/company/request.

Use expectedVersion for record edits/actions and case progress. Reports/framework saves and graph rebuild use expectedRevision for the company snapshot. Review current data after a 409; do not blindly retry old content with a new key.

Implemented routes

MethodPathRuntime definition
POST/api/auth/demoserver/app.ts
POST/api/auth/loginserver/app.ts
POST/api/auth/logoutserver/app.ts
GET/api/auth/meserver/app.ts
GET/api/auth/optionsserver/app.ts
POST/api/auth/registerserver/app.ts
GET/api/healthserver/app.ts
GET/api/invitations/{token}server/app.ts
POST/api/invitations/{token}/enrollserver/app.ts
GET/api/maintenanceserver/app.ts
POST/api/pilot-applicationsserver/app.ts
GET/api/v1/companiesserver/app.ts
POST/api/v1/companiesserver/app.ts
PATCH/api/v1/companies/{companyId}server/app.ts
GET/api/v1/companies/{companyId}/agent-requestsserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requestsserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/ai-draftserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/issueserver/agent-requests.ts
GET/api/v1/companies/{companyId}/agent-requests/{requestId}/manifestserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/manifestserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/reviewserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/simulateserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/{requestId}/withdrawserver/agent-requests.ts
POST/api/v1/companies/{companyId}/agent-requests/demoserver/agent-requests.ts
GET/api/v1/companies/{companyId}/aiserver/ai.ts
POST/api/v1/companies/{companyId}/aiserver/ai.ts
POST/api/v1/companies/{companyId}/assetsserver/assets.ts
PUT/api/v1/companies/{companyId}/assets/{assetId}/chunks/{index}server/assets.ts
GET/api/v1/companies/{companyId}/assets/{assetId}/contentserver/assets.ts
POST/api/v1/companies/{companyId}/assets/{assetId}/finalizeserver/assets.ts
GET/api/v1/companies/{companyId}/assets/{assetId}/statusserver/assets.ts
POST/api/v1/companies/{companyId}/assets/{assetId}/transcribeserver/transcription.ts
GET/api/v1/companies/{companyId}/assets/{assetId}/transcriptionserver/transcription.ts
POST/api/v1/companies/{companyId}/assets/{assetId}/transcription-reviewserver/transcription.ts
GET/api/v1/companies/{companyId}/discoveryserver/discovery.ts
POST/api/v1/companies/{companyId}/discovery/{jobId}/applyserver/discovery.ts
POST/api/v1/companies/{companyId}/discovery/draftserver/discovery.ts
POST/api/v1/companies/{companyId}/discovery/meetingserver/discovery.ts
POST/api/v1/companies/{companyId}/exportsserver/app.ts
GET/api/v1/companies/{companyId}/exports/{recordId}/downloadserver/app.ts
GET/api/v1/companies/{companyId}/framework-runsserver/frameworks.ts
GET/api/v1/companies/{companyId}/framework-runs/{key}server/frameworks.ts
POST/api/v1/companies/{companyId}/framework-runs/{key}server/frameworks.ts
GET/api/v1/companies/{companyId}/framework-runs/{key}/{runId}/sourceserver/frameworks.ts
POST/api/v1/companies/{companyId}/frameworks/{key}/manualserver/app.ts
GET/api/v1/companies/{companyId}/graphserver/app.ts
POST/api/v1/companies/{companyId}/graph/rebuildserver/app.ts
DELETE/api/v1/companies/{companyId}/neo4jserver/neo4j.ts
GET/api/v1/companies/{companyId}/neo4jserver/neo4j.ts
PUT/api/v1/companies/{companyId}/neo4jserver/neo4j.ts
POST/api/v1/companies/{companyId}/neo4j/rebuildserver/neo4j.ts
POST/api/v1/companies/{companyId}/neo4j/testserver/neo4j.ts
GET/api/v1/companies/{companyId}/providersserver/providers.ts
DELETE/api/v1/companies/{companyId}/providers/{provider}server/providers.ts
PUT/api/v1/companies/{companyId}/providers/{provider}server/providers.ts
POST/api/v1/companies/{companyId}/recordsserver/app.ts
PATCH/api/v1/companies/{companyId}/records/{recordId}server/app.ts
POST/api/v1/companies/{companyId}/records/{recordId}/actionsserver/app.ts
GET/api/v1/companies/{companyId}/records/{recordId}/historyserver/app.ts
POST/api/v1/companies/{companyId}/reportsserver/reports.ts
GET/api/v1/companies/{companyId}/reports/{reportId}/{format}server/reports.ts
POST/api/v1/companies/{companyId}/reports/{reportId}/reviewserver/reports.ts
POST/api/v1/companies/{companyId}/requests/{recordId}/emailserver/invitations.ts
GET/api/v1/companies/{companyId}/requests/{recordId}/email-previewserver/invitations.ts
GET/api/v1/companies/{companyId}/requests/{recordId}/emailsserver/invitations.ts
POST/api/v1/companies/{companyId}/requests/{recordId}/issueserver/app.ts
GET/api/v1/companies/{companyId}/researchserver/research.ts
POST/api/v1/companies/{companyId}/researchserver/research.ts
POST/api/v1/companies/{companyId}/research/{runId}/sources/{index}/importserver/research.ts
POST/api/v1/companies/{companyId}/roster/applyserver/app.ts
POST/api/v1/companies/{companyId}/roster/previewserver/app.ts
POST/api/v1/companies/{companyId}/runtime/preflightserver/app.ts
GET/api/v1/companies/{companyId}/strategy-briefsserver/strategy.ts
POST/api/v1/companies/{companyId}/strategy-briefsserver/strategy.ts
POST/api/v1/companies/{companyId}/workflows/{workflowId}/casesserver/workflows.ts
POST/api/v1/companies/{companyId}/workflows/cases/{caseId}/actionsserver/workflows.ts
GET/api/v1/companies/{companyId}/workspaceserver/app.ts
GET/api/v1/participant/requestsserver/app.ts
POST/api/v1/participant/requests/{recordId}/submitserver/app.ts
POST/api/v1/participant/requests/{recordId}/task-draftserver/app.ts
POST/api/v1/sample-companyserver/app.ts

Record payloads

POST records accepts a closed object with kind and data. PATCH records/{recordId} accepts data and expectedVersion; the existing record determines kind. The generated OpenAPI file contains a kind-discriminated creation union and runtime Zod input schemas. FIELD-REFERENCE lists the human-readable field limits. Server-generated snapshots, hashes, workflow checkpoints, review flags and authority states cannot be inserted through generic input. Original evidence and requests cannot be edited.

The route inventory is complete for the current declarations, but full response/error schemas and every non-record request body are not yet expressed in OpenAPI. Use the executable API tests and source validators for those exact payloads. This limitation remains in the production contract backlog.

Main command flows

Errors and operations

Errors carry a code, readable message, retryable flag and requestId where handled by the application. Typical statuses: 400 invalid command metadata; 401 missing/expired session; 403 actor/origin/CSRF rejection; 404 inaccessible scope; 409 version, binding or transition conflict; 410 expired request/audio; 422 semantic validation; 429 auth throttling; 503 unconfigured runtime. See tests/api.test.ts for executable examples.

The health route checks a live database query and reports service/version/runtime coverage. It does not prove external provider health, signing or customer-system access. Generated client reports are audience-reviewed local downloads; the explicit request email endpoint sends through the configured Resend account. No route executes a customer business action.