Aller au contenu principal

GET /api/chain/:slug/contracts

List every contract on the state machine, newest first.

Auth

Bearer with viewer role or higher.

Response — 200

{
"ok": true,
"contracts": [
{
"id": "uuid",
"originId": "zeq-dev:my-iot-fleet",
"name": "ProductionEscrow",
"version": "1.0",
"currentState": "funded",
"createdAt": "2026-04-28T01:49:00Z",
"updatedAt": "2026-04-28T01:50:13Z"
}
]
}

The definition field is included; for large definitions, fetch a single contract via GET …/contracts/:id.

Curl

curl -sS https://zeqapi.com/api/chain/my-iot-fleet/contracts \
-H "Authorization: Bearer ${ZSM_KEY}"