NODANA API Full reference: https://nodana.io/api-ref Base URL: https://api.nodana.io/v1 Authentication: Authorization: Bearer NODANA_API_KEY Create keys in Developers > API Keys. Save the secret when shown. Scopes: nodes:read; nodes:write also requires nodes:read. Keep keys in backend secret storage. GET /nodes — List nodes. Returns {nodes: [...]}. GET /nodes/{nodeId} — Read node metadata; publicUrl is the Phoenixd HTTPS URL. POST /nodes — Create a node. Required: requestId (new random 32 hex characters), autoLiquidity (2m/5m/10m). Optional: name. Returns 202 with node metadata and one-time credentials {seed,password,restrictedPassword}. Save credentials in secret storage; never log the response. Check GET /nodes/{nodeId} for readiness. Repeating an accepted request returns 409. If launch fails, discard its credentials and create a new node. PATCH /nodes/{nodeId} — Rename with JSON {name}. POST /nodes/{nodeId}/start — Start a stopped node. POST /nodes/{nodeId}/stop — Stop a ready node. POST /nodes/{nodeId}/restart — Restart a ready node. GET /nodes/{nodeId}/update — Check currentRelease and availableUpdate. POST /nodes/{nodeId}/update — Start an approved update with JSON {releaseSha256}. DELETE /nodes/{nodeId} — Delete after handling funds and recovery material. Returns 202 with no body. PAY LINKS The API key selects the account, using the same node scopes as other management routes. GET /paylinks — List pay links across the account, newest first. Returns an array, or []. POST /paylinks — Create a hosted payment page. Required: nodeId. Optional: description, reference, amountSat, currency, paymentLimit, returnUrl. Returns 201 with the pay link and shareable url. GET /paylinks/{linkId} — Read a pay link. Pay link responses include receivedSat (total confirmed sats received) and paymentCount (confirmed payment count). Both start at 0. trend24h contains 24 hourly totals ending in the current hour: {at: Unix seconds, sats: confirmed sats received}. PATCH /paylinks/{linkId} — Update description, reference, amountSat, currency, paymentLimit, enabled, returnUrl. Omitted fields retain their values; null clears reference, amountSat or a return URL, or makes paymentLimit unlimited. The receiving node cannot change. DELETE /paylinks/{linkId} — Delete a link and stop new invoices. Returns 204 without a body. Omit amountSat or set null to let the payer choose. A fixed amount must be a positive whole number of sats. Currency is USD, GBP or EUR for the approximate fiat display; defaults to the account setting. Invoices are in sats. paymentLimit defaults to 1. Use null for unlimited payments. The link stops issuing invoices once its confirmed payment count reaches the limit. reference is an optional order or checkout ID, containing non-whitespace text and at most 128 characters. It is passed unchanged as the invoice externalId and returned as externalId in payment records and signed payment webhooks. Omit or use null to leave it unset. Changes apply to new invoices; existing invoices retain their reference. Use one link and a unique reference per order, and verify the node, payment hash and expected amount before fulfilment. Return URLs must use HTTPS without embedded credentials. Existing invoices may still settle after disabling or deleting a link. Reference: https://nodana.io/api-ref/pay-links/create-link WEBHOOK ENDPOINTS One public HTTPS receiver per node. Use the same Nodana API key and node scopes. GET /nodes/{nodeId}/webhook-endpoint — Read {endpoint}, or {endpoint:null} when not configured. POST /nodes/{nodeId}/webhook-endpoint — Create with JSON {url,description?}. Returns 201 with endpoint and signingSecret; save the secret when returned. PATCH /nodes/{nodeId}/webhook-endpoint — Change url, description or enabled. Empty description clears it. DELETE /nodes/{nodeId}/webhook-endpoint — Remove the endpoint and delivery history. Returns 204 without a body. GET /nodes/{nodeId}/webhook-deliveries — Read the latest 50 deliveries, newest first. Webhook guide: https://nodana.io/api-ref/webhooks Signature verification: https://nodana.io/api-ref/webhook-authentication Reads require nodes:read; mutations require nodes:write. Keys select one account. Asynchronous acceptance is not completion; read the node to confirm the outcome. Responses use JSON. Errors use {error:{code,message}}. 401: check key and scopes. 402: account credit/billing. 404: node absent or outside account. 409: request conflict. 429: wait Retry-After. Reconcile mutation outcomes after a timeout. X-RateLimit-Reset is seconds until reset. Phoenixd invoices/payments/balances: https://nodana.io/api-ref Phoenixd commands: https://nodana.io/cli-ref ATTESTATION POST /attestation on your node's standard HTTPS URL (port 443). Send JSON {"nonce":""} without an Authorization header. Returns certificate (PEM), attestationDocument (Base64), and identity (hostname, node ID, node/owner public keys and certificate hash). Verify locally against the original nonce, saved node/owner identity, AWS trust anchor and client-approved measurements before trusting the certificate. See https://nodana.io/api-ref/attestation CLI verification: nd attest --url NODE_HTTPS_URL --approve-release-sha256 APPROVED_RELEASE_SHA256