The developer API
Seven endpoints, five that read and two that change things, each behind a named scope, with keys you issue and rotate yourself.
The public API is small on purpose. It is not a second interface onto the whole product; it lets something you build read a workspace, and make the two decisions a person most often wants to automate: resolving an approval and setting an agent's control mode. Every endpoint is under /api/v1, and every request carries a bearer token.
Base URL
https://api.hawiagents.com/v1The endpoints
| Method | Path | Scope required |
|---|---|---|
| GET | /api/v1/auth | None beyond a valid key. Reports what the key can do. |
| GET | /api/v1/workspaces/{workspaceId} | workspace:read |
| GET | /api/v1/workspaces/{workspaceId}/files | files:read |
| GET | /api/v1/workspaces/{workspaceId}/control-center | control-center:read |
| GET | /api/v1/workspaces/{workspaceId}/analytics | analytics:read |
| POST | /api/v1/workspaces/{workspaceId}/approvals/{requestId} | approvals:write |
| POST | /api/v1/workspaces/{workspaceId}/agents/{agentId}/control-mode | agents:write |
The two changes
Each takes a small JSON body and is safe to repeat: sending the state something is already in returns 200 with replayed: true and changes nothing.
POST /api/v1/workspaces/{workspaceId}/approvals/{requestId}
{ "resolution": "approved" } // or "rejected"
200 { "id": "…", "status": "approved", "replayed": false }
409 { "error": "Approval already resolved." } // it was resolved the other way firstPOST /api/v1/workspaces/{workspaceId}/agents/{agentId}/control-mode
{ "controlMode": "guarded_control" } // "full_control" | "guarded_control" | "human_in_the_loop"
200 { "ok": true, "replayed": false }
409 { "error": "…", "code": "reality_gate", "reason": "…" } // loosening supervision was refusedA key with either scope still answers 403 insufficient_scope when the person who created it no longer owns the workspace, so a key made by an admin cannot use them at all. Both are logged against the key and the person it acts as.
Scopes
| Scope | Grants | Used by |
|---|---|---|
workspace:read | Read the workspace this key belongs to. | GET /api/v1/workspaces/{workspaceId} |
files:read | List file metadata for that workspace. | GET /api/v1/workspaces/{workspaceId}/files |
control-center:read | Read the workspace's agents, pending approvals and service health. | GET /api/v1/workspaces/{workspaceId}/control-center |
analytics:read | Read usage and run figures for the workspace. | GET /api/v1/workspaces/{workspaceId}/analytics |
approvals:write | Changes things. Approve or reject a pending agent action, payments included. | POST /api/v1/workspaces/{workspaceId}/approvals/{requestId} |
agents:write | Changes things. Set how much an agent may do without asking. | POST /api/v1/workspaces/{workspaceId}/agents/{agentId}/control-mode |
One key, one workspace
A key is issued against a single workspace and is bound to it. Passing any other workspace identifier returns 404, whether or not that workspace exists. There is no key that spans workspaces; if you need to read two, issue two keys.