https://<project-ref>.supabase.co/functions/v1/kill-switch
Auth: Supabase user JWT. Caller must have admin or owner role.
Request
Body
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | string (uuid) | Yes | Target workspace |
action | string | Yes | enable, disable, pause_tool, or resume_tool |
tool | string | For pause_tool / resume_tool | One of the valid tool names |
Examples
Response
Status codes
| Code | Meaning |
|---|---|
200 | Action applied successfully |
400 | Invalid payload or unsupported action |
401 | Not authenticated |
403 | Admin or owner role required |
405 | Method not allowed |
500 | Database update failed |
Side effects
Every kill switch call:- Updates
workspaces.kill_switch_enabled(for global) ortool_connections.paused(for tool pause) - Writes an audit log entry with
risk_level = critical - Queues a notification for the
kill_switchevent (email + Slack if configured)