Skip to main content

HTTP REST API

Seraph exposes a local HTTP server on port 8090 (configurable in settings) that mirrors the Tauri command surface. Every dispatch command is reachable two ways:

  • POST /invoke — raw {cmd, args} JSON. Same wire shape the Tauri webview uses internally. See Raw dispatch.
  • REST sugar routes — readable URLs like POST /api/bots/{id}/warp. These build the matching InvokeBody and forward to the same dispatcher; both share auth + business logic.
  • Authentication — exchange the local PIN for a bearer token
  • Raw dispatch/invoke and /x
  • Scripts — manage SeraphRuntime Lua scripts
  • Jobs — list + bulk-stop running scripts across bots
  • Bots — connect, warp, walk, snapshot per-bot state
  • Events stream — Server-Sent Events live mirror
  • Errors — status codes + error envelope shape

Source-of-truth

Every REST sugar route is a thin shell over dispatch() in src-tauri/src/api_dispatch.rs. That file is the canonical list of every command: argument shape, return type, and which Tauri command it forwards to. If a route isn't here yet, you can always reach it via POST /invoke with the matching cmd name.