Skip to content

HTTP API ​

All error responses use { "error": { "code": string, "message": string, "requestId": string, "details"?: unknown } } unless a separately deployed service documents otherwise. The same correlation ID is returned in x-request-id. Production omits private diagnostic causes; non-production may include the cause under details.

Server health and runs ​

MethodPathResult
GET/health{ "status": "ok" }
GET/ready{ "status": "ready" }, or HTTP 503 with degraded workspace issues
POST/api/runsExecute { flowPath, input?, authorizationToken?, sessionId? } synchronously
POST/api/runs/asyncAdd debug?, callbackUrl?, and interactionRequest?; returns 202 and location
GET/api/runs/:idPublic durable run; 202 while active, 200 terminal, 404 missing
POST/api/runs/:id/continueAdvance a paused debug run
POST/api/runs/:id/cancelCancel queued, active, paused, or suspended work

flowPath is relative to WORKSPACE_ROOT/workflows; traversal outside it returns a stable boundary error. A public run includes timestamps, result/error, continuation, callback delivery state, node states, and status URL.

Async debug runs move in paused/running transitions and only advance after POST /api/runs/:id/continue.

Webhooks ​

MethodPathResult
GET/api/webhooksManifest-derived webhook descriptors
GET/api/webhooks/:id/workflowReturn the workflow graph
GET/api/webhooks/:id/runsActive runs for that workflow
POST/api/webhooks/:idManifest-selected sync or async execution
POST/api/webhooks/:id/asyncOptional additional async endpoint

Request shape is manifest-specific JSON or multipart form data. Async acceptance returns { runId, status, statusUrl } with 202 and Location.

Example multipart request:

http
POST /api/webhooks/book-document HTTP/1.1
Authorization: Bearer <application-api-key>
Content-Type: multipart/form-data; boundary=----faimulus

------faimulus
Content-Disposition: form-data; name="prompt"

Summarize the attached files.
------faimulus
Content-Disposition: form-data; name="attachments"; filename="report.pdf"
Content-Type: application/pdf

<binary bytes>
------faimulus--

Async webhook interactions default to public and non-broadcasted. Poll statusUrl; a suspended run includes interactionRequest with its request ID, questions, private, broadcasted, and creation time. Set X-Faimulus-Interaction-Private or X-Faimulus-Interaction-Broadcasted to the literal true or false to override those defaults.

Webhook execution calls require Authorization: Bearer <api-key>. The server reads APPLICATION_API_KEY at startup. The corresponding application principal has access to every declared workflow capability.

Manual workflow authorization ​

MethodPathResult
GET/api/workflows/:id/authorization/previewTrusted proxy principal and capabilities entitled for the workflow
POST/api/workflows/:id/authorizationExchange { capabilityIds } for a five-minute, single-use launch token

The authorization exchange requires a principal from TRUSTED_IDENTITY_HEADER and rejects capability IDs outside that principal's grants. Pass the returned token as authorizationToken to POST /api/runs or POST /api/runs/async; it is bound to the workflow and principal.

Authorization registry ​

MethodPathResult
GET/api/authorization/principalsPrincipal IDs and their configured grants
PUT/api/authorization/principals/:id/grantsReplace a principal's grants with { grants }
GET/api/authorization/api-keysFixed API-key metadata including principal ID and env var name

Schedules and interaction requests ​

MethodPathResult
GET/api/scheduled-workflowsScheduling-eligible descriptors
GET/api/schedulesAll schedules
GET/api/schedules/:idOne schedule
POST/api/schedulesCreate a one-time or interval schedule; 201
PATCH/api/schedules/:idUpdate enabled state, input, or cadence fields accepted by the route
DELETE/api/schedules/:idDelete; 204
GET/api/interaction-requests?status=pendingPending non-private requests
GET/api/interaction-requests/:idOne pending request
POST/api/interaction-requests/:id/resolveResolve with { response } and continue the run

POST /api/runs/async, schedule creation, and schedule updates accept interactionRequest: { private, broadcasted }. Direct runs default both fields to false; schedules default to { private: false, broadcasted: true }. Add withPrivate=true to the pending-list query to include private requests. Add broadcasted=true to return only broadcasted requests; both filters can be combined.

MCP toolset registry ​

MethodPathResult
GET/api/toolsetsConfigured HTTP MCP records loaded from config/toolsets.yaml
GET/api/toolsets/:name/toolsDiscover remote tools for one configured toolset with host policy

Records identify a streamable HTTP endpoint and optional authorization-token environment variable. Toolsets are loaded once at startup from workspace config. Secrets are resolved only while constructing an execution catalog or performing read-only tool discovery.

Authenticated channel integration ​

These server routes require Authorization: Bearer <integration secret> for the :channelId registry entry.

MethodPathResult
GET/api/channel-integrations/:channelId/workflowsAvailable workflow descriptors
POST/api/channel-integrations/:channelId/runsEnqueue a channel-correlated run; 202
POST/api/channel-integrations/:channelId/interaction-requests/:requestId/resolveResolve a request scoped to an instance

Run submissions contain workflowId, channelInstanceId, messageId, input, and optional interactionRequest. Channel interactions always return to their originating channel and default to { private: true, broadcasted: false }. The server fixes the callback URL from its registry and derives idempotency from instance/message identity.

Channel management API ​

These routes are served by the Faimulus server and require an admin session when admin authentication is configured.

MethodPathResult
GET/api/channels/host/driversDriver schemas and actions
GET / POST/api/channels/host/instancesList or create instances
GET / PUT / DELETE/api/channels/host/instances/:idRead, replace configuration, or remove
POST/api/channels/host/instances/:id/actions/:actionExecute a driver action with optional input
GET/api/channels/host/workflowsWorkflow descriptors available to channel instances
POST/api/channels/host/instances/:id/messagesSend { requestId, target, message }; returns 202
POST/api/channels/host/callbacksSigned completion/interaction-request callback; returns 204

Channel workflow completions are normally delivered in-process. The callback endpoint requires X-Faimulus-Signature: sha256=<hex> over the exact JSON body.

Memories ​

MethodPathResult
GET/api/memory/driversRegistered memory driver descriptors and JSON schemas
GET/api/memoriesImmutable startup memory definitions from config/memories.yaml
GET/api/memories/:name/contentDriver-backed named memory content for supported memory definitions

There are no memory mutation endpoints.

Workflow calls through POST /api/runs and POST /api/runs/async accept an optional sessionId. Webhook endpoints accept the same value in x-session-id.

Documentation for the current repository state.