Skip to main content

API Endpoints

Base URL: http://localhost:3001/api/v1

All endpoints require Authorization: Bearer {token} unless marked as Public. Responses use a consistent envelope:

{ "success": true, "data": { ... }, "error": null }

Interactive Swagger docs are available at http://localhost:3001/docs when running locally.


Auth

Prefix: /api/v1/auth

MethodPathAuthDescription
POST/registerPublicRegister new user + organization
POST/loginPublicLogin with email/password, returns JWT tokens
POST/refreshPublicRefresh access token using refresh token
POST/inviteOWNER/ADMINInvite a member to the organization

Organizations

Prefix: /api/v1/orgs

MethodPathAuthDescription
GET/meAuthenticatedGet current user's organization
PATCH/meOWNER/ADMINUpdate organization details
GET/me/membersAuthenticatedList organization members
GET/me/settingsOWNER/ADMINGet org settings (API keys masked)
PATCH/me/settingsOWNER/ADMINUpdate org settings (LLM provider, etc.)
DELETE/me/members/:idOWNER/ADMINRemove a member from the org

Surrogates

Prefix: /api/v1/surrogates

MethodPathAuthDescription
POST/AuthenticatedCreate a new surrogate
GET/AuthenticatedList surrogates (paginated)
GET/:idAuthenticatedGet surrogate by ID
PATCH/:idAuthenticatedUpdate surrogate
DELETE/:idAuthenticatedSoft-delete surrogate

SOPs

Prefix: /api/v1/sops

MethodPathAuthDescription
GET/AuthenticatedList SOPs (filter by surrogateId, status)
GET/:idAuthenticatedGet SOP by ID (includes graph)
POST/AuthenticatedCreate a new SOP
POST/:sopId/versionsAuthenticatedCreate a new version of an SOP
PATCH/:id/statusAuthenticatedTransition SOP status (DRAFT/ACTIVE/ARCHIVED)

LLM

Prefix: /api/v1/llm

MethodPathAuthDescription
GET/providersAuthenticatedList available LLM providers and config
POST/generate-sopAuthenticatedGenerate SOP via configured LLM provider

Audit

Prefix: /api/v1/audit

MethodPathAuthDescription
POST/AuthenticatedCreate an audit entry
GET/AuthenticatedList audit entries (filter by surrogateId, action, dates)
GET/:id/verifyAuthenticatedVerify audit chain integrity from entry ID

Stats

Prefix: /api/v1/stats

MethodPathAuthDescription
GET/dashboardAuthenticatedGet dashboard statistics

Org DNA

Prefix: /api/v1/org-dna

MethodPathAuthDescription
POST/documentsAuthenticatedUpload an organizational document
GET/documentsAuthenticatedList documents (paginated)
GET/documents/:idAuthenticatedGet document by ID
DELETE/documents/:idOWNER/ADMINDelete a document
POST/searchAuthenticatedSemantic search across document chunks

Memory

Prefix: /api/v1/memory

MethodPathAuthDescription
GET/AuthenticatedList memory entries (filter by surrogateId, type, tags)
GET/:idAuthenticatedGet memory entry by ID
POST/AuthenticatedCreate a memory entry (STM or LTM)
PATCH/:id/promoteOWNER/ADMINPromote STM entry to LTM
DELETE/:idOWNER/ADMINArchive a memory entry
POST/detect-patternsAuthenticatedRun pattern detection on a surrogate's memories
POST/cleanupOWNER/ADMINCleanup expired STM entries

Debriefs

Prefix: /api/v1/debriefs

MethodPathAuthDescription
GET/AuthenticatedList all debriefs (paginated)
GET/analyticsAuthenticatedGet debrief analytics
POST/sessionsAuthenticatedStart a new session
GET/sessionsAuthenticatedList sessions (filter by surrogateId, status)
GET/sessions/:sessionIdAuthenticatedGet session detail
POST/sessions/:sessionId/decisionsAuthenticatedRecord a decision outcome
PATCH/sessions/:sessionId/completeAuthenticatedComplete a session
POST/sessions/:sessionId/generateAuthenticatedGenerate debrief from session data
GET/sessions/:sessionId/debriefAuthenticatedGet debrief for a session

Proposals

Prefix: /api/v1/proposals

MethodPathAuthDescription
POST/AuthenticatedCreate a manual SOP proposal
POST/from-debriefAuthenticatedCreate proposal from debrief analysis
GET/AuthenticatedList proposals (filter by sopId, status)
GET/:idAuthenticatedGet proposal detail
PATCH/:id/reviewOWNER/ADMINApprove or reject a proposal

Fleet

Prefix: /api/v1/fleet

MethodPathAuthDescription
GET/statusAuthenticatedFleet-wide status overview
GET/surrogatesAuthenticatedEnriched surrogates list with health data
GET/surrogates/:id/healthAuthenticatedIndividual surrogate health metrics
GET/analyticsAuthenticatedFleet-wide analytics
GET/sessions/activeAuthenticatedList active sessions across fleet

Handoffs

Prefix: /api/v1/handoffs

MethodPathAuthDescription
POST/AuthenticatedInitiate a handoff (D2D, D2H, or H2D)
POST/:id/acceptAuthenticatedAccept an incoming handoff
POST/:id/rejectAuthenticatedReject an incoming handoff
GET/AuthenticatedList handoffs (filter by status, type, surrogateId)
GET/:idAuthenticatedGet handoff detail

Personas

Prefix: /api/v1/personas

MethodPathAuthDescription
POST/AuthenticatedCreate persona template
GET/AuthenticatedList persona templates (filter by domain, category, tags)
GET/:idAuthenticatedGet persona template with versions
PATCH/:idAuthenticatedUpdate persona template (creates new version)
POST/:id/rollbackAuthenticatedRollback to a specific version
POST/:id/instantiateAuthenticatedCreate surrogate from persona template
GET/:id/exportAuthenticatedExport persona template as JSON
POST/importAuthenticatedImport persona template from JSON
DELETE/:idOWNER/ADMINSoft-delete persona template

Marketplace

Prefix: /api/v1/marketplace

MethodPathAuthDescription
POST/publishAuthenticatedPublish an SOP to the marketplace
GET/AuthenticatedBrowse marketplace (filter by domain, category, rating)
GET/:idAuthenticatedGet listing detail
POST/:id/installAuthenticatedInstall a marketplace SOP into your org
POST/:id/reviewsAuthenticatedAdd a review
GET/:id/reviewsAuthenticatedList reviews for a listing
PATCH/:idAuthenticatedUpdate listing (owner org only)
DELETE/:idAuthenticatedRemove listing (owner org only)

Bias

Prefix: /api/v1/bias

MethodPathAuthDescription
POST/checkAuthenticatedTrigger a bias check on a surrogate
GET/checksAuthenticatedList bias checks (paginated)
GET/checks/:idAuthenticatedGet bias check detail
GET/distributionAuthenticatedGet decision distribution analysis
GET/anomaliesAuthenticatedGet recent anomalies
GET/dashboardAuthenticatedAggregated bias dashboard data

Humanoid

Prefix: /api/v1/humanoid

MethodPathAuthDescription
POST/devicesAuthenticatedRegister a humanoid device
GET/devicesAuthenticatedList devices (filter by status, modality)
GET/devices/:idAuthenticatedGet device detail
PATCH/devices/:id/statusAuthenticatedUpdate device status
POST/devices/:id/kill-switchOWNER/ADMINTrigger kill switch (SOFT_PAUSE/FULL_STOP/EMERGENCY_KILL)
POST/translate/:sopId/:deviceIdAuthenticatedTranslate SOP for specific device modality
GET/devices/:id/healthAuthenticatedDevice health metrics

Federation

Prefix: /api/v1/federation

MethodPathAuthDescription
POST/contributeAuthenticatedSubmit anonymized decision data
GET/contributionsAuthenticatedList org's contributions
GET/insightsAuthenticatedGet federated pool insights
POST/apply/:sopIdAuthenticatedApply federated insights to an SOP
GET/privacy-reportAuthenticatedPrivacy budget report
PATCH/participationOWNEROpt in/out of federation
GET/leaderboardAuthenticatedContribution leaderboard

Compliance

Prefix: /api/v1/compliance

MethodPathAuthDescription
POST/check/:surrogateIdAuthenticatedRun compliance check against a framework
GET/frameworksAuthenticatedList available regulatory frameworks
GET/frameworks/:idAuthenticatedGet framework detail and rules
POST/sign/:sopIdOWNER/ADMINCryptographically sign an SOP (Ed25519)
GET/verify/:sopIdAuthenticatedVerify SOP signatures
GET/history/:surrogateIdAuthenticatedCompliance check history
GET/status/:surrogateIdAuthenticatedCurrent certification status
POST/report/:surrogateIdAuthenticatedGenerate compliance report

Executions

Prefix: /api/v1/executions

MethodPathAuthDescription
POST/startAuthenticatedStart a new SOP execution
POST/:id/advanceAuthenticatedAdvance execution to next graph node
PATCH/:id/pauseAuthenticatedPause a running execution
PATCH/:id/resumeAuthenticatedResume a paused execution
POST/:id/abortAuthenticatedAbort an execution with reason
POST/:id/escalateAuthenticatedTrigger human escalation
GET/:idAuthenticatedGet execution state
GET/AuthenticatedList executions (filter by status, surrogateId)
GET/:id/timelineAuthenticatedDecision timeline for an execution
GET/:id/transitionsAuthenticatedAvailable transitions from current node

API Keys

Prefix: /api/v1/api-keys

MethodPathAuthDescription
POST/OWNER/ADMINCreate a new API key
GET/OWNER/ADMINList API keys
DELETE/:idOWNER/ADMINRevoke an API key
POST/:id/rotateOWNER/ADMINRotate an API key

Webhooks

Prefix: /api/v1/webhooks

MethodPathAuthDescription
POST/OWNER/ADMINRegister a webhook
GET/OWNER/ADMINList webhooks
PATCH/:idOWNER/ADMINUpdate webhook (URL, events, active)
DELETE/:idOWNER/ADMINDelete webhook
GET/:id/deliveriesOWNER/ADMINView delivery log
POST/:id/testOWNER/ADMINSend test webhook

Notifications

Prefix: /api/v1/notifications

MethodPathAuthDescription
GET/AuthenticatedList notifications (filter by unreadOnly)
GET/unread-countAuthenticatedGet unread notification count
PATCH/:id/readAuthenticatedMark notification as read
PATCH/read-allAuthenticatedMark all notifications as read

Error Responses

All errors follow a consistent format:

{
"success": false,
"data": null,
"error": {
"code": "SURROGATE_NOT_FOUND",
"message": "Surrogate with ID ... does not exist",
"statusCode": 404
}
}
StatusMeaning
400Validation error
401Authentication required
403Insufficient permissions
404Resource not found
409Conflict (duplicate)
429Rate limited (100 req/min)
500Internal error