Skip to main content

API Design

Gap Closure: B1.2

This page addresses Blueprint Supplement Gap B1.2: "No API design or data schema yet." This is a proposed API design requiring CTO review before implementation. All endpoints, schemas, and patterns described here are recommendations.

The ReGenesis API is the single point of entry for all client applications (web, mobile, browser extension) and external integrations. It is a RESTful API with versioning, JWT authentication, role-based authorization, rate limiting, and comprehensive audit logging.

API at a Glance

AttributeSpecification
ProtocolHTTPS (TLS 1.3)
StyleRESTful with JSON payloads
VersioningURL-based (/api/v1/)
AuthenticationJWT with refresh token rotation
AuthorizationRBAC + ABAC (visibility tags)
Rate LimitingPer-tenant, per-user, per-endpoint
PaginationCursor-based for lists
Error FormatRFC 7807 (Problem Details)
DocumentationOpenAPI 3.1 spec
MonitoringRequest logging, latency tracking, error rates

Endpoint Groups

GroupPurposeKey Endpoints
/authAuthentication and session managementLogin, refresh, logout, MFA
/usersUser profile managementCRUD, preferences, consent
/sessionsCoaching session managementSchedule, metadata, recordings
/relationshipsCoach-coachee relationship managementList, create, update status, end
/goalsGoal tracking and progressCRUD, linked evidence, archival
/action-itemsAction item managementCRUD, filter by session/goal/status
/transcriptsSession transcript accessView, search
/insightsAI-generated insightsList, detail, approve, reject
/evidenceEvidence pack accessL0/L1/L2, provenance
/integrationsThird-party connectionsConnect, disconnect, status
/uploadsFile upload managementPresigned URL, confirm upload
/sashaSasha AI interactionsCompanion chat, live session
/adminTenant administrationUsers, settings, metrics
/webhooksIncoming webhook receiversZoom, Stripe, Slack, Teams

Request Flow Diagram


No PII in URLs

Query parameters and URL paths are logged by CDNs, load balancers, and web servers. NEVER include coaching content, user names, email addresses, or any PII in URLs. All sensitive data travels in request/response bodies over HTTPS.

API Key Rotation

Service-to-service API keys must be rotated every 90 days. The rotation process must be automated and zero-downtime (dual-key validation during transition period).

OpenAPI Specification

A full OpenAPI 3.1 specification will be generated from the TypeScript interfaces above and published at https://docs.regenesis.ai/api/v1/openapi.json. This enables automated client SDK generation and API testing.