Docs · HTTP
HTTP API
Examples
Curl examples
Gateway Examples
These examples assume you already have signed-envelope headers. Use HTTP helpers to generate them from Shell, JavaScript, or Python.
curl -sS -X POST https://api.nukez.xyz/v1/storage/signed_provision \ -H "Content-Type: application/json" \ -H "X-Nukez-Envelope: $ENV_B64URL" \ -H "X-Nukez-Signature: $SIG_B58" \ -d '{"receipt_id":"a107ea1ad3de433d","tags":[]}' # envelope ops: ["locker:provision"]{ "ok": true, "space": { "locker_id": "locker_527830025389", "receipt_id": "a107ea1ad3de433d", "path_prefix": "lockers/locker_527830025389/" }}
Code notes
Provisioning binds the confirmed receipt to a deterministic locker. The request is authenticated by the signed envelope headers, and the response gives you the locker id used by later file calls.
The helper page shows how to generate $ENV_B64URL and $SIG_B58 from Shell, JavaScript, or Python.
curl -sS -X POST https://api.nukez.xyz/v1/lockers/$LOCKER_ID/files \ -H "Content-Type: application/json" \ -H "X-Nukez-Envelope: $ENV_B64URL" \ -H "X-Nukez-Signature: $SIG_B58" \ -d '{"filename":"Anza.pdf","content_type":"application/pdf","ttl_min":30}' # envelope ops: ["locker:write"]{ "upload_url": "https://api.nukez.xyz/f/...", "download_url": "https://api.nukez.xyz/f/...", "confirm_url": "https://api.nukez.xyz/v1/files/confirm?..."} curl -sS -L -X PUT -H "Content-Type: application/pdf" \ --data-binary @./Anza.pdf "$UPLOAD_URL" curl -sS -X POST "$CONFIRM_URL"{ "filename": "Anza.pdf", "size_bytes": 5395694, "content_hash": "sha256:9d6500e596f267..." }
Code notes
A file create request returns short-lived storage URLs. Upload the bytes to the signed upload URL, then POST the confirm URL so the gateway records size and content hash in the locker manifest.
For files near the Cloud Run upload cap, resolve the redirect first and PUT directly to storage.
curl -sS "https://api.nukez.xyz/v1/storage/verification-bundle?receipt_id=$RECEIPT_ID" | jq . # returns:{ "payment_proof": { "...": "..." }, "content_proof": { "merkle_root": "sha256:...", "files": [] }, "on_chain_anchor": { "switchboard_slot": 348900000, "switchboard_tx": "..." }, "verify_yourself": []}
Code notes
The verification bundle is the handoff artifact. It contains payment proof, content proof, on-chain anchor metadata, and self-verification instructions.
See /proof/verify for the independent recomputation recipe.
