POST /api/chain/:slug/connection
Record an open/close connection event. The hash is computed server-side over the metadata.
Auth
Bearer with operator role or higher.
Request
{
"direction": "inbound",
"peer_hash": "sha256-of-peer-id",
"protocol": "wss",
"state": "open"
}
| Field | Type | Required | Notes |
|---|---|---|---|
direction | string | optional | "inbound" or "outbound". Default "inbound". |
peer_hash | string | optional | ≤ 128 chars |
protocol | string | optional | ≤ 32 chars |
state | string | optional | "open" or "close" |
Response — 201
{ "ok": true, "zeqondNumber": 2287439213, "transitionId": "9b1c-…uuid" }
Curl
curl -sS https://zeqapi.com/api/chain/my-iot-fleet/connection \
-H "Authorization: Bearer ${ZSM_KEY}" \
-H "Content-Type: application/json" \
-d '{"direction":"inbound","protocol":"wss","state":"open"}'