Skip to content

API Surfaces

Zenvara exposes the same typed entities through three surfaces — REST, MCP, and GraphQL — plus the zen CLI, which forwards to REST. The equivalence is deliberate: a flow is callable identically from a human, a script, and an AI agent.

All REST lives under /api/v1/, split into two families.

Operates within a versioning branch. Includes a generic entity CRUD surface plus bespoke verbs:

/api/v1/{branch}/entities/{type} # generic CRUD: flow, environment, connection,
# cache-policy, folio, skill, template, script,
# var-set, team, mapping, annotation, ...
/api/v1/{branch}/flows/... # bespoke verbs: invoke, validate, preview
/api/v1/{branch}/invocations/...
/api/v1/{branch}/environments/...
/api/v1/{branch}/connections/...
/api/v1/{branch}/cicd/... # validation, packaging, sync invocation
/api/v1/{branch}/versions/... # history, diff, revert

The branch segment is required. The live alias resolves to production on Git-disabled deployments. The local segment activates the filesystem overlay (/api/v1/local/...) when LocalOverlay.Enabled: true.

Cross-branch, installation-level entities and verbs:

/api/v1/platform/entities/{type} # user, api-key, secret, backup, branch,
# share, invocation, config-section, ...
/api/v1/platform/auth/...
/api/v1/platform/users/...
/api/v1/platform/secrets/...
/api/v1/platform/backups/...
/api/v1/platform/branches/...
/api/v1/platform/diagnostics
/api/v1/platform/logs
/api/v1/platform/git/sync # HMAC-triggered config sync
/api/v1/platform/support # support + feature requests

platform is a reserved prefix.

Terminal window
curl -X POST http://localhost:5000/api/v1/live/flows/hello/invocations \
-H "Content-Type: application/json" \
-d '{"message":"Hi there"}'

Tracing data ships in X-Zenvara-{Operator,Entity,Duration-Ms} response headers.

The Model Context Protocol server lets AI assistants (Claude Code, VS Code, any MCP host) discover and call tools against your installation. Key tools:

ToolDoes
invoke-flowRun a flow with typed parameters.
invoke-operator-actionInvoke a single operator action directly.
read-entity / list-entitiesRead and list any entity (with filter support, e.g. folio/skill/template query search).
set-secretWrite a secret.
add-tag / set-annotationManage governance annotations.
submit-support-request / submit-feature-requestFile to the Zenvara team.

Read-resource URIs provide search and history: folios:///search/{q}, skills:///search/{q}, versions:///{type}/{name}/history, invocations:///introspection[/{id}].

A resolver surface for typed queries against the same entities, mapping the same error codes to GraphQL error codes (see Error Catalog).

CallerSurface
Human at a terminalzen CLI
Script / CI pipelineREST (X-API-Key)
AI assistant / agentMCP
Typed app integrationGraphQL or REST

URL family rules (/{branch}/ vs /platform/, the live alias, error-body hint conventions) are detailed in the platform’s api-url-rules reference.