Docs/API Reference/Emergency Shutdown

Emergency Shutdown API

Activate and monitor emergency shutdowns to halt AI agent operations when critical incidents are detected. Severity-based response from monitoring alerts to full service suspension.

Endpoints

GET/v1/emergency-shutdownGet active shutdown status
POST/v1/emergency-shutdownActivate emergency shutdown

Authentication

Both endpoints require API key authentication. Subject to admin-level rate limiting.

Critical Operation
Emergency shutdown at severity 4-5 will block all governance calls for the organization, returning 503 until resolved. Use with caution.

Severity Levels

LevelLabelImpact
5CriticalAll governance calls return 503 — full service halt
4SevereAll governance calls return 503 — full service halt
3MajorGovernance responses include emergency warnings
2ModerateAlert logged, monitoring active
1MinorAlert logged, monitoring active

Get Shutdown Status

GET/v1/emergency-shutdown

Returns all active emergency shutdowns for your organization.

bash
curl "https://api.tork.network/v1/emergency-shutdown" \
  -H "x-tork-api-key: tork_sk_your_api_key"
json
{
  "active_shutdowns": [
    {
      "id": "esd_abc123",
      "severity": 4,
      "severity_label": "Severe",
      "reason": "Detected unredacted PII in production output",
      "scope": "org",
      "status": "activated",
      "activated_at": "2026-02-12T10:00:00Z",
      "activated_by": "key_prefix_abc"
    }
  ]
}

Activate Emergency Shutdown

POST/v1/emergency-shutdown

Activates an emergency shutdown with the specified severity level.

Request Body

ParameterTypeRequiredDescription
severitynumberYesSeverity level 1-5
reasonstringYesDescription of the incident (non-empty)
scopestringNoShutdown scope: "org" (default), "key", or "all"

Example

bash
curl -X POST "https://api.tork.network/v1/emergency-shutdown" \
  -H "x-tork-api-key: tork_sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "severity": 5,
    "reason": "Critical data breach detected — unredacted SSNs in agent output",
    "scope": "org"
  }'
json
{
  "shutdown_id": "esd_d4e5f6",
  "severity": 5,
  "severity_label": "Critical",
  "status": "activated",
  "scope": "org",
  "activated_at": "2026-02-12T14:30:00Z",
  "message": "CRITICAL: All governance calls will return 503 until resolved",
  "affected_scope": {
    "org_id": "org_abc123",
    "scope": "org"
  }
}

Error Responses

StatusDescription
400Invalid severity (must be 1-5), empty reason, or invalid scope
401Missing or invalid API key
429Rate limit exceeded
500Internal server error