HTTP API reference
This reference reflects the current backend routes in internal/api/routes.go.
Authentication
If GESTALT_TOKEN is unset, auth is disabled.
If GESTALT_TOKEN is set:
- REST: send
Authorization: Bearer <token> - WebSocket/SSE: either
Authorization: Bearer <token>or?token=<token>
REST endpoints
Status and metrics
GET /api/statusGET /api/metrics/summaryGET /api/git/log
Sessions
GET /api/sessionsPOST /api/sessionsDELETE /api/sessions/:idGET /api/sessions/:id/outputPOST /api/sessions/:id/inputPOST /api/sessions/:id/activateGET /api/sessions/:id/historyGET /api/sessions/:id/input-historyPOST /api/sessions/:id/input-historyPOST /api/sessions/:id/bellPOST /api/sessions/:id/notify
Agents and skills
GET /api/agentsGET /api/skills
Plans
GET /api/plans
Flow configuration
GET /api/flow/activitiesGET /api/flow/event-typesGET /api/flow/configPUT /api/flow/configGET /api/flow/config/exportPOST /api/flow/config/import
Flow config endpoint policy:
GET /api/flow/configandPUT /api/flow/configuse JSON.GET /api/flow/config/exportalways returns YAML with:Content-Type: application/yaml; charset=utf-8Content-Disposition: attachment; filename="flows.yaml"
POST /api/flow/config/importis YAML-only. Accepted media types:application/yamlapplication/x-yamltext/yamltext/x-yamlCharset parameters (for example; charset=utf-8) are allowed.
POST /api/flow/config/importreturns:415 Unsupported Media Typefor missing or unsupportedContent-Type(includingapplication/json)400 Bad Requestfor invalid YAML or schema shape mismatch409 Conflictfor semantic conflicts (for example duplicate trigger IDs)500 Internal Server Errorfor save failures
OpenTelemetry
POST /api/otel/logsGET /api/otel/tracesGET /api/otel/metrics
WebSocket endpoints
GET /ws/session/:id(terminal stream)GET /ws/logsGET /ws/events(filesystem events)GET /api/agents/eventsGET /api/sessions/eventsGET /api/config/events
SSE endpoints
GET /api/events/streamGET /api/logs/streamGET /api/notifications/stream
Notes
- The canonical session namespace is
/api/sessions/*. /api/terminals/*is not part of the current API surface.POST /api/sessions/:id/inputis the canonical interactive input path for both server-backed and tmux-backed agent sessions.
Migration notes
- Replace deprecated
POST /api/agents/:name/send-inputcalls withPOST /api/sessions/:id/input. - Use canonical singleton session IDs ending in
1(for exampleCoder 1).
Git log endpoint
GET /api/git/log
Query params:
limit(optional): number of commits to return. Default20, max50.
Behavior:
- Returns
200with{"branch":"","commits":[]}outside a git repository. - Returns
503when git is unavailable or the command times out.
Example response:
json
{
"branch": "git-log-dashboard",
"commits": [
{
"sha": "0123456789abcdef0123456789abcdef01234567",
"short_sha": "0123456789ab",
"committed_at": "2026-02-18T00:00:00Z",
"subject": "feat(dashboard): add git log panel",
"stats": {
"files_changed": 2,
"lines_added": 45,
"lines_deleted": 8,
"has_binary": false
},
"files_truncated": false,
"files": [
{
"path": "frontend/src/views/Dashboard.svelte",
"added": 32,
"deleted": 7,
"binary": false
}
]
}
]
}