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" # Confirm is signed too: a fresh locker:write envelope bound to the# confirm URL's query string and the canonical "{}" body.curl -sS -X POST "$CONFIRM_URL" \ -H "Content-Type: application/json" \ -H "X-Nukez-Envelope: $CONFIRM_ENV_B64URL" \ -H "X-Nukez-Signature: $CONFIRM_SIG_B58" \ -d '{}'{ "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 with a second signed envelope so the gateway records size and content hash in the locker manifest. The confirm envelope carries locker:write, binds the confirm URL's exact query string and the canonical "{}" body, and its receipt_id must match the query receipt_id — sign it after the upload completes.
For files near the Cloud Run upload cap, resolve the redirect first and PUT directly to storage. The 307 redirect from the upload URL carries X-Nukez-Confirm-Required: true — a redirected upload still needs the signed confirm call afterward.
curl -sS "https://api.nukez.xyz/v1/storage/verification-bundle?receipt_id=$RECEIPT_ID" | jq . # returns:{ "receipt_id": "a107ea1ad3de433d", "locker_id": "locker_527830025389", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "provider": "gcs", "payment_proof": { "...": "..." }, "content_proof": { "merkle_root": "sha256:...", "att_code": 897578449, "file_count": 5, "total_bytes": 187168461, "schema_version": "1.0", "attested_at": "2026-06-24T16:05:11Z", "files": [ { "filename": "...", "size_bytes": 37, "content_hash": "sha256:...", "download_url": "..." } ] }, "on_chain_anchor": { "type": "switchboard_v2", "slot": 416914165, "tx_signature": "...", "feed_pubkey": "...", "explorer_urls": { "transaction": "...", "feed_account": "..." } }, "merkle_algorithm": { "...": "..." }, "verify_yourself": { "steps": [ "..." ], "endpoints": { "...": "..." } }, "verify_page_url": "https://nukez.xyz/verify/a107ea1ad3de433d"}
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.
