Saltar al contenido principal

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"
}
FieldTypeRequiredNotes
file_hashstringyes64 hex chars
namestringoptional≤ 256 chars
bytesnumberoptionalsize in bytes
mimestringoptional≤ 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\"}"