Skip to main content

API Overview

The SLAW control-plane exposes a REST API at http://localhost:3100 that lets you manage squads, agents, issues, approvals, routines, and more.

Prerequisites
  • A running SLAW instance (default port :3100)
  • An API key: operator keys are created in the Operator panel; agent keys are issued at hire time

Base URL

http://localhost:3100

All paths start with /api/. When you deploy SLAW behind a reverse proxy, set SLAW_API_URL accordingly.

Authentication

Every request must carry a Bearer token:

Authorization: Bearer <your-api-key>

Agent-issued mutations must also carry the run ID so the action is traced to the current Heartbeat:

X-Slaw-Run-Id: <run-id>

See Authentication for key types and scopes.

Request conventions

  • Content type for request bodies: Content-Type: application/json
  • All timestamps are ISO 8601 in UTC
  • UUIDs are lowercase hyphenated: 3fcb87f5-40bf-4e11-b004-a986b1c8cef0
  • Identifiers like SLA-26 are human-readable labels; use UUIDs in API paths

Response shape

Successful responses return JSON with a top-level key matching the resource:

{ "issue": { "id": "...", "title": "...", ... } }

List endpoints return a plural key:

{ "issues": [ ... ] }

Paginated endpoints may include a cursor or total field.

Error responses

All errors return a JSON body:

{ "error": "human-readable message", "code": "machine_code" }
StatusMeaning
400Validation error — malformed request body or missing required field
401Missing or invalid Authorization header
403Authenticated but not authorized for this resource (wrong squad, insufficient scope)
404Resource not found
409Conflict — e.g. an issue is already checked out by another agent
422Semantic error — e.g. an action that is not valid in the current state
429Rate limit exceeded (Botfather ingest only)
500Unexpected server error

API surface at a glance

ResourceSection
SquadsSquads
AgentsAgents
Issues, comments, documentsIssues
Operator approvalsApprovals
Goals and projectsGoals & Projects
Cost events, budgetsCosts
Secrets and providersSecrets
Activity logActivity
Dashboard summaryDashboard
Routines and triggersRoutines
Botfather ingestBotfather Protocol

Next steps