Canary Deployment API

Monitor agent health with canary heartbeat checks. Automatically detects silent agents and creates policy reviews per NIST G-1.5 guidelines.

Endpoint

GET/v1/canaryGet canary heartbeat status

Authentication

Requires API key authentication via x-tork-api-key or Authorization: Bearer header. Subject to admin-level rate limiting.

How It Works

The canary endpoint monitors the heartbeat of all agents in your organization by tracking their last governance API call. Agents are classified as:

healthy

Last seen within 60 minutes

silent

No activity for 60+ minutes — a policy review is automatically created (NIST G-1.5)

Automatic Review Creation
When a silent agent is detected, a policy review of type canary_alert is automatically created in the review queue.

Response

Response Fields

FieldTypeDescription
organization_idstringYour organization ID
agentsarrayArray of agent status objects
agents[].key_prefixstringAPI key prefix (masked)
agents[].last_seenstringISO timestamp of last governance call
agents[].silent_minutesnumberMinutes since last activity
agents[].statusstring"healthy" or "silent"
summary.totalnumberTotal number of agents
summary.activenumberNumber of healthy agents
summary.silentnumberNumber of silent agents
reviews_createdstring[]IDs of policy reviews created for silent agents (if any)

Example

bash
curl "https://api.tork.network/v1/canary" \
  -H "x-tork-api-key: tork_sk_your_api_key"
json
{
  "organization_id": "org_abc123",
  "agents": [
    {
      "key_prefix": "tork_sk_a1b2",
      "last_seen": "2026-02-12T14:25:00Z",
      "silent_minutes": 5,
      "status": "healthy"
    },
    {
      "key_prefix": "tork_sk_c3d4",
      "last_seen": "2026-02-12T12:00:00Z",
      "silent_minutes": 150,
      "status": "silent"
    }
  ],
  "summary": {
    "total": 2,
    "active": 1,
    "silent": 1
  },
  "reviews_created": ["rev_x1y2z3"]
}

Error Responses

StatusDescription
401Missing or invalid API key
429Rate limit exceeded
500Internal server error