HTTP API reference
Authoritative route list for arcflow-server. Matches HTTP API reference.
This page reflects the implemented HTTP API.
Server streaming (deferred): GET /v1/runs/{run_id}/events (SSE) is deferred. Not listed below.
Base URL examples use http://localhost:8080. Replace with your deployment host.
Public
GET /health
Liveness probe. No auth.
GET /ready
Readiness: Postgres reachable and migrations at head. 200 when ready, 503 when degraded.
Runs (runtime API key)
Auth: Authorization: Bearer <ARCFLOW_SERVER_API_KEY> or X-ArcFlow-Api-Key.
POST /v1/runs
Create and execute a workflow run. Requires Postgres.
Body (inline workflow):
Or registry reference (do not send both inline workflow and workflow_ref):
Optional header: Idempotency-Key: <uuid>.
201 response:
Errors: 400 validation, 401 auth, 403 scoped key workflow denied, 503 Postgres unavailable.
GET /v1/runs/{run_id}
Poll status, result, error, interrupt.
200 completed:
200 interrupted (HITL):
GET /v1/runs/{run_id}/trace
metadata-only trace ExecutionTrace JSON.
POST /v1/runs/{run_id}/approve/{approval_key}
Resume or reject HITL interrupt.
200 on approve:
Reject with "approved": false yields terminal Failed (HumanRejected).
POST /v1/runs/{run_id}/external/{binding_id}
External system callback. Body: ExternalOutcomeReport JSON. Verify X-ArcFlow-Signature when ARCFLOW_WEBHOOK_SECRET is set.
Workflow registry (runtime API key)
PUT /v1/workflows/{name}/versions/{version}
Publish a versioned workflow definition.
Note: handler expects publish payload per handlers/registry.rs (definition + agents structure).
GET /v1/workflows/{name}/versions/{version}
Fetch exact version.
GET /v1/workflows/{name}/resolve?range={semver}
Resolve semver range to highest matching version.
Response:
POST /v1/workflows/{name}/aliases/{alias}
Point alias (e.g. latest) at a version.
Deprecated
POST /v1/workflows/run
Legacy single-shot run. Prefer POST /v1/runs. Still registered for backward compatibility.
Admin (admin API key)
Auth: Authorization: Bearer <ARCFLOW_ADMIN_API_KEY>.
POST /v1/admin/sites
Create site; site_token returned once.
Response:
GET /v1/admin/sites/{site_id}
PATCH /v1/admin/sites/{site_id}
Update origins, rate limits, defaults.
POST /v1/admin/sites/{site_id}/tokens/rotate
Invalidate prior token; returns new token once.
POST /v1/admin/sites/{site_id}/knowledge/ingest
POST /v1/admin/sites/{site_id}/workflows/chat/publish
Publish chat workflow to registry for the site.
Full admin contract: Admin API reference (ArcFlow repository).
Debug (localhost, ARCFLOW_DEBUG)
Feature-gated. Not for production.
POST /v1/debug/runs/startGET /v1/debug/runs/{id}/statePOST /v1/debug/runs/{id}/continue
Common HTTP codes
| Code | Typical cause |
|---|---|
| 401 | Missing or wrong API key |
| 403 | Scoped key, origin (Relay), or inline workflow denied |
| 429 | Relay rate limit |
| 503 | Postgres unavailable |
Related pages
- authentication.md
- run-state-machine.md
- idempotency.md
- relay/request-path.md for browser proxy routes