POST /api/chain/:slug/file
Record a file-hash event. The server stores the hash plus minimal metadata; the bytes themselves stay with the caller.
Auth
Bearer with operator role or higher.
Request
{
"file_hash": "0123abc…64hex",
"name": "report-2026-Q2.pdf",
"bytes": 1048576,
"mime": "application/pdf"
}
| Field | Type | Required | Notes |
|---|---|---|---|
file_hash | string | yes | 64 hex chars |
name | string | optional | ≤ 256 chars |
bytes | number | optional | size in bytes |
mime | string | optional | ≤ 128 chars |
Response — 201
{ "ok": true, "zeqondNumber": 2287439213, "transitionId": "9b1c-…uuid" }
Curl
SHA=$(sha256sum report.pdf | cut -d' ' -f1)
curl -sS https://zeqapi.com/api/chain/my-iot-fleet/file \
-H "Authorization: Bearer ${ZSM_KEY}" \
-H "Content-Type: application/json" \
-d "{\"file_hash\":\"${SHA}\",\"name\":\"report.pdf\",\"bytes\":$(stat -c%s report.pdf),\"mime\":\"application/pdf\"}"