Prerequisites
An API key from Developers → API Keys in the dashboard
1. Get Your API Key
Navigate to the NearNode Console → Developers → API Keys → Generate.
Copy the key immediately — it’s shown only once.
sk_live_a1b2c3d4e5f6g7h8i9j0...
Store your API key securely. Never commit it to version control or expose it in client-side code.
2. Create Your First Node
curl -X POST https://nearnode.io/api/v1/nodes \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"label": "Office Front Door",
"function_type": "redirect",
"payload": {
"url": "https://yourcompany.com/welcome"
}
}'
{
"data": {
"id": "node_abc123...",
"slug": "k9m2xp4q",
"url": "https://nearnode.io/v/k9m2xp4q",
"function_type": "redirect",
"status": "active"
}
}
3. Generate a QR Code
Use any QR library to encode the scan URL. The URL is permanent — only the destination behind it changes.
CLI (qrencode)
Node.js (qrcode)
Python (qrcode)
qrencode -o office-door.png "https://nearnode.io/v/k9m2xp4q"
import QRCode from 'qrcode';
await QRCode.toFile('office-door.png', 'https://nearnode.io/v/k9m2xp4q');
import qrcode
img = qrcode.make("https://nearnode.io/v/k9m2xp4q")
img.save("office-door.png")
4. Update the Destination
Change where the QR code points — without reprinting:
curl -X PATCH https://nearnode.io/api/v1/nodes/k9m2xp4q \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"payload": {
"url": "https://yourcompany.com/new-page"
}
}'
5. Try Other Payload Types
The same node API supports multiple function types. Swap function_type and payload to serve different content:
{
"label": "James Page",
"function_type": "vcard",
"payload": {
"first_name": "James",
"last_name": "Page",
"organization": "VidiAI",
"phone": "+41791234567",
"email": "james@vidiai.ch"
}
}
{
"label": "Guest WiFi",
"function_type": "wifi",
"payload": {
"ssid": "Office-Guest",
"password": "welcome2026",
"security": "WPA2"
}
}
{
"label": "WhatsApp Support",
"function_type": "action",
"payload": {
"action_type": "whatsapp",
"phone": "+41791234567",
"message": "Hi, I scanned your tag!"
}
}
6. Track Scans
Every scan is logged with device type, location, and timestamp. You can:
View in Dashboard
Real-time scan analytics with geo breakdown and device stats.
What’s Next?
Node Types
vCard, WiFi, Microsite, Actions — not just redirects.
Routing Rules
A/B tests, time-based, geo-targeting, device routing.
Batch API
Generate thousands of nodes at once for fleet operations.