introduction
REST API · v1

GenXQR API Reference

A clean, predictable REST API to create, update, and manage QR codes and analytics from any language or platform.

Introduction

The GenXQR REST API lets you create, manage, and analyse QR codes programmatically. Integrate QR code generation into your product, automate workflows, and pull scan analytics — all from your server.

API key auth

Simple Bearer token authentication — no OAuth dance.

REST + JSON

Standard HTTP verbs, predictable JSON responses everywhere.

Webhooks

Push events to your server the instant something happens.

Base URL
https://genxqr.com/v1

Authentication

All API requests require an API key passed in the Authorization header using the Bearer scheme. Generate a key from API Keys in your dashboard. API access requires the Pro plan or higher — keys return 403 if the account drops below Pro — and each account can hold up to 10 keys.

bash
# Every request must include this header
curl https://genxqr.com/v1/qr \
  -H "Authorization: Bearer gxqr_live_••••••••••••••••••••••••••••••••"

Keep your key secret

API keys have no scopes: any key can read, create, change and delete every QR code and webhook in your account. Store them in environment variables (GenXQR_API_KEY), never in client-side code or source files. If a key is exposed, revoke it immediately from the dashboard and generate a replacement.

Rate Limits

Rate limits are applied per account — every API key on the account shares the same budget. When you exceed the per-minute limit, the API responds with HTTP 429 and a Retry-After header telling you how many seconds to wait.

LimitValueNotes
Per-minute rate300 req / minPer account, across all /v1 endpoints
Monthly quota10,000 (Pro) · 100,000 (Business) · no practical cap (Enterprise)Calls per calendar month (UTC); over-quota calls get 429 without Retry-After. Calls refused by the per-minute limit don't count
Retry-AfterSeconds to waitIncluded in per-minute 429 responses
bash
# Rate limit response
HTTP/1.1 429 Too Many Requests
Retry-After: 14
Content-Type: application/json

{
  "success": false,
  "error": "API rate limit exceeded (300 req/min). Slow down or contact support to raise your cap."
}

Error Codes

Errors always return a JSON body with success: false and a human-readable error field. Validation errors (422) additionally include a details object mapping each invalid field to its messages.

json
// Standard error response
{
  "success": false,
  "error": "Validation failed",
  "details": {
    "name": ["Required"],
    "type": ["Invalid enum value. Expected 'URL' | 'PDF' | …, received 'LINK'"]
  }
}
CodeTitleDescription
400Bad RequestThe request is valid but can't be applied — for example an expiry date beyond your current subscription period, or an unusable webhook URL.
401UnauthorizedMissing, invalid, revoked or expired API key. Ensure your Authorization header is set correctly.
403ForbiddenYour current plan doesn't include API access or this feature, or you've reached a plan limit such as your QR code allowance. Upgrade to continue.
404Not FoundThe requested resource doesn't exist or belongs to another account.
422Unprocessable EntityThe request body or query parameters failed validation. The response includes a details object listing each invalid field.
429Too Many RequestsYou exceeded the per-minute rate limit (the response includes a Retry-After header) or your plan's monthly API call quota.
500Internal Server ErrorAn unexpected error occurred on our side. These are logged. Please retry after a moment.

Pagination

GET /v1/qr uses page-based pagination. Pass page and limit (max 50) as query parameters; the response includes a pagination object. List Scans uses limit and since instead.

bash
# Request page 3, 50 items per page
curl "https://genxqr.com/v1/qr?page=3&limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"
json
// pagination object in the list response
"pagination": {
  "total": 142,
  "page": 3,
  "limit": 50,
  "totalPages": 3,
  "hasNext": false,
  "hasPrev": true
}

Integrations — Zapier, Make & n8n

Connect GenXQR to thousands of apps without code. GenXQR has its own apps for Zapier and Make (added through an invite link while they are in beta), and works with n8n through its built-in Webhook and HTTP Request nodes. All three use the same API and webhooks documented on this page.

You need

  • The Pro plan or higher — the API and webhooks are part of it.
  • An API key from genxqr.com → API Keys (one per tool, so you can revoke one alone). A key from any other site won't work.

Triggers

  • New QR Scan (Make: Watch QR Scans · event qr.scanned) — Every recorded scan of any of your codes, with location, device, OS and browser.
  • New QR Code (Make: Watch New QR Codes · event qr.created) — A code is created — in the dashboard, by bulk upload, a duplicate, or the API.
  • QR Code Updated (Make: Watch QR Code Updates · event qr.updated) — A code's destination or settings change, or it is switched on/off.
  • QR Code Deleted (Make: Watch QR Code Deletions · event qr.deleted) — A code is deleted.

Actions (Zapier & Make)

  • Create QR Code — Creates a dynamic QR code for a URL.
  • Update QR Destination — Changes where a code sends people — no reprinting.
  • Activate / Deactivate QR Code — Switches a code on or off.
  • Delete QR Code — Deletes a code permanently.

What a scan carries

scannedAtWhen it was scanned (UTC)
qrName / qrSlug / qrIdWhich code
country, countryCode, region, cityApproximate location
deviceTypeMOBILE, TABLET or DESKTOP
osAndroid, iOS, Windows, macOS, Linux
browserChrome, Safari, Samsung Browser…
referrerThe referring page, if any
isUniqueFirst scan from this device in 4 hours
placeName / placeCode / placeIdThe code's place when scanned (Places), if it has one
idThe scan's own id

Good to know

  • Every recorded scan triggers, including repeat scans from the same phone — filter on isUnique = true to keep first scans only.
  • Very heavy repeat scanning from one network (over 10 a minute or 100 a day on one code) still redirects people but is not recorded, so it triggers nothing.
  • Deliveries pause if the account drops below Pro, and resume when it is back on Pro.

Zapier

Add GenXQR to Zapier
  1. 1Open the GenXQR invite link for Zapier and accept it — this adds GenXQR to your Zapier account.
  2. 2Create a Zap. For the trigger choose GenXQR and an event (e.g. New QR Scan), then connect with your API key.
  3. 3Test the trigger: it shows up to 3 recent scans of your most recently updated code (scan one first if there are none).
  4. 4Add an action (e.g. Google Sheets → Create Spreadsheet Row). Map each field by inserting it from the GenXQR step — typing a field's name writes that text, not the value.
  5. 5Publish. Turning the Zap on adds a “Zapier — qr.scanned” webhook in GenXQR → Webhooks; turning it off removes it.

Make

Add GenXQR to Make
  1. 1Open the GenXQR invite link for Make and install the app.
  2. 2Create a scenario, click +, and add GenXQR → Watch QR Scans (or another trigger).
  3. 3Click Create a webhook → Add, paste your API key and save — Make checks the key and registers its webhook in GenXQR.
  4. 4Add the next module (e.g. Google Sheets → Add a Row) and map the GenXQR fields.
  5. 5Turn the scenario on. Switching it off removes its webhook from GenXQR again.

n8n

No GenXQR node to install — n8n's built-in nodes do it. Webhook payloads are described under Events & Payloads, the endpoints under QR Codes and Analytics below.

  1. 1Add a Webhook node (method POST) to a workflow and copy its Production URL.
  2. 2In GenXQR → Webhooks, add a webhook with that URL and the events you want (or create it with POST /v1/webhooks). Activate the workflow.
  3. 3Each delivery's body is { event, timestamp, data } — the scan fields are under data.
  4. 4To act on GenXQR, add an HTTP Request node: header Authorization: Bearer <your API key>, and the endpoints from the API reference (e.g. PATCH https://genxqr.com/v1/qr/:id).
  5. 5Optional: verify the X-GenXQR-Signature header with the webhook's secret in a Code node (see Signature Verification).

AI assistants (MCP)

GenXQR is an MCP server (Model Context Protocol), so AI assistants such as Claude, Cursor and other MCP clients can manage your codes in plain language — “make a QR code for our Diwali menu and put it in the Diwali folder”, “which of my codes got the most scans this week?”. It needs API access (Pro plan or higher) and counts against the same rate limit and monthly quota as the rest of this API. Apps that sign in (claude.ai, ChatGPT) need no API key; the others use one.

claude.ai, Claude Desktop and ChatGPT — sign in, no key

  1. Claude: Settings → Connectors → Add custom connector. ChatGPT: add a custom connector (in developer mode, on plans where ChatGPT offers it).
  2. Name it GenXQR and enter the URL https://genxqr.com/v1/mcp. Leave any client ID and secret fields empty.
  3. Connect: you are sent to GenXQR, sign in if needed, and choose Allow. The app then works with your codes.
  4. To disconnect, use API Keys → Connected AI apps in the dashboard (or remove the connector in the app).

Clients that take a server URL and a header — with an API key

bash
https://genxqr.com/v1/mcp
# Header: Authorization: Bearer gxqr_live_...

Claude Code

bash
claude mcp add --transport http genxqr https://genxqr.com/v1/mcp \
  --header "Authorization: Bearer gxqr_live_..."

Cursor and other clients with remote MCP (mcp.json)

json
{
  "mcpServers": {
    "genxqr": {
      "url": "https://genxqr.com/v1/mcp",
      "headers": { "Authorization": "Bearer gxqr_live_..." }
    }
  }
}

Claude Desktop with an API key instead (through the mcp-remote bridge)

json
{
  "mcpServers": {
    "genxqr": {
      "command": "npx",
      "args": ["mcp-remote", "https://genxqr.com/v1/mcp", "--header", "Authorization:${GENXQR_AUTH}"],
      "env": { "GENXQR_AUTH": "Bearer gxqr_live_..." }
    }
  }
}

Tools

list_qr_codesYour codes, newest first; filter by search, type, folder or place
get_qr_codeOne code with its content, design, settings and scan URL
create_qr_codeA new dynamic code of any type (content as in Content Schemas)
update_qr_codeChange a code's name, content, tags, folder or place — the print keeps working
set_qr_code_activeSwitch a code on or off
delete_qr_codeDelete a code permanently (assistants are told to confirm first)
get_qr_analyticsScans over the last 1–90 days by day, country, city, device, OS and browser
list_placesYour places, for placeId
list_foldersYour folders, for folderId

Changes made through MCP send the same webhooks as the dashboard and appear in your activity log. Use a separate API key for each assistant, so you can revoke one on its own. Sign-in uses OAuth 2.1 with PKCE and dynamic client registration (discovery at /.well-known/oauth-authorization-server); access tokens last an hour and refresh for up to 30 days.

QR Codes

Create, read, update, and delete QR codes in your account.

GET/v1/qr

List QR Codes

Returns a paginated list of the QR codes in your account, newest first by default. Use query parameters to filter, sort and paginate.

Query Parameters

NameTypeDescription
pageintegerPage number, 1-indexed. Default: 1
limitintegerResults per page. Default: 20. Max: 50
typestringFilter by QR type (URL, PDF, WIFI, VCARD, …)
searchstringMatches QR code names or place names (partial, case-insensitive), an exact tag or a place's location ID
placeIdstringOnly codes at this place (ids from List Places), or none for codes without a place
updatedSincestringISO 8601 timestamp — only QR codes updated at or after this time
sortstringcreatedAt (default) or updatedAt — newest first

Response Fields

NameTypeDescription
dataarrayArray of QR code objects
pagination.pageintegerCurrent page number
pagination.limitintegerResults per page
pagination.totalintegerTotal number of matching QR codes
pagination.totalPagesintegerTotal number of pages
pagination.hasNextbooleanWhether a later page exists
pagination.hasPrevbooleanWhether an earlier page exists

Status Codes

200Success — list returned
401Invalid or missing API key
403Your plan does not include API access (Pro or higher)
422Invalid query parameter
429Rate limit or monthly quota exceeded
bash
curl "https://genxqr.com/v1/qr?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "clxxxxxxxxxxxxxxxx",
      "name": "Restaurant Menu",
      "type": "URL",
      "category": "DYNAMIC",
      "slug": "aB3dE5fG",
      "tags": ["menu"],
      "scanCount": 1243,
      "isActive": true,
      "createdAt": "2025-04-01T10:00:00.000Z",
      "updatedAt": "2025-04-14T08:30:00.000Z"
    }
  ],
  "pagination": {
    "total": 42,
    "page": 1,
    "limit": 20,
    "totalPages": 3,
    "hasNext": true,
    "hasPrev": false
  }
}
POST/v1/qr

Create QR Code

Creates a new QR code. It is assigned a unique slug which is embedded in the scannable URL (https://genxqr.com/r/<slug>). New QR codes are active immediately.

Request Body

NameTypeDescription
name*stringDisplay name for the QR code (max 200 characters)
type*stringQR type. One of: URL, PDF, VIDEO, LINKS, SOCIAL_MEDIA, VCARD, IMAGE_GALLERY, BUSINESS, APP, MP3, MENU, WIFI, WHATSAPP, INSTAGRAM, FACEBOOK, COUPON, UPI, GOOGLE_REVIEW, EVENT, FORM
contentobjectType-specific content, wrapped as { data: { … } }. See Content Schemas below.
categorystringDYNAMIC (default) or STATIC
tagsstring[]Up to 10 tags, max 50 characters each
placeIdstringThe place it is printed at (an id from List Places). Scans are then counted for that place
designobjectColours, dot and corner styles, logo and frame — same fields as design in Get QR Code
settingsobjectOptional: password, activeFrom, activeUntil, scanLimit, fallbackUrl, fbPixelId, gaId, gtmId, linkedinPartnerId, tiktokPixelId

* Required

Response Fields

NameTypeDescription
idstringUnique QR code ID (CUID)
namestringQR code display name
slugstringShort identifier embedded in the scan URL
typestringQR type
categorystringSTATIC or DYNAMIC
isActivebooleanWhether the QR code is currently active
createdAtstringISO 8601 creation timestamp

Status Codes

201QR code created successfully
400Expiry date is beyond your current subscription period
401Invalid or missing API key
403QR code limit reached, or your plan lacks API access or expiry dates
422Validation error — check request body
429Rate limit or monthly quota exceeded
bash
curl -X POST https://genxqr.com/v1/qr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Launch",
    "type": "URL",
    "content": {
      "data": {
        "url": "https://yourproduct.com/launch"
      }
    },
    "tags": ["marketing", "product"]
  }'
Response
{
  "success": true,
  "data": {
    "id": "clxxxxxxxxxxxxxxxx",
    "name": "Product Launch",
    "type": "URL",
    "category": "DYNAMIC",
    "slug": "xY7zW9qR",
    "tags": ["marketing", "product"],
    "scanCount": 0,
    "isActive": true,
    "createdAt": "2025-04-14T10:00:00.000Z",
    "updatedAt": "2025-04-14T10:00:00.000Z"
  }
}
GET/v1/qr/:id

Get QR Code

Retrieves a single QR code by its ID, including its content and design configuration.

Response Fields

NameTypeDescription
idstringUnique QR code ID
namestringDisplay name
slugstringScan URL slug
typestringQR type
scanCountintegerTotal number of scans recorded
contentobjectType-specific content data
designobjectVisual design configuration
isActivebooleanActive state

Status Codes

200QR code found and returned
401Invalid or missing API key
404QR code not found or belongs to another account
bash
curl https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "id": "clxxxxxxxxxxxxxxxx",
    "name": "Product Launch",
    "type": "URL",
    "category": "DYNAMIC",
    "slug": "xY7zW9qR",
    "scanCount": 57,
    "isActive": true,
    "content": {
      "data": {
        "url": "https://yourproduct.com/launch"
      }
    },
    "design": {
      "dotStyle": "rounded",
      "primaryColor": "#7c3aed",
      "backgroundColor": "#ffffff"
    },
    "createdAt": "2025-04-14T10:00:00.000Z",
    "updatedAt": "2025-04-14T10:00:00.000Z"
  }
}
PATCH/v1/qr/:id

Update QR Code

Updates an existing QR code. Only the fields you provide are changed — all others remain untouched. For dynamic QR codes, new content applies from the next scan, without reprinting. This endpoint does not change isActive — use Toggle QR Code for that.

Request Body

NameTypeDescription
namestringNew display name
contentobjectNew type-specific content, as { data: { … } }. Replaces existing content entirely.
tagsstring[]Replace the tag list (max 10)
placeIdstringMove it to another place (null for none). Scans already recorded stay with the place they happened at
designobjectDesign fields to change — fields you omit keep their current value
settingsobjectpassword ("" removes it), activeFrom, activeUntil (ISO 8601, null to clear), scanLimit (null to clear), fallbackUrl, fbPixelId, gaId, gtmId, linkedinPartnerId, tiktokPixelId

Response Fields

NameTypeDescription
idstringQR code ID
updatedAtstringISO 8601 timestamp of the update
…Plus every other field returned by Get QR Code

Status Codes

200QR code updated successfully
400Expiry date is beyond your current subscription period
401Invalid or missing API key
403Your plan lacks API access, expiry dates or QR frames
404QR code not found
422Validation error — check request body
bash
curl -X PATCH https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": {
      "data": {
        "url": "https://yourproduct.com/new-page"
      }
    },
    "settings": { "scanLimit": 500 }
  }'
Response
{
  "success": true,
  "data": {
    "id": "clxxxxxxxxxxxxxxxx",
    "name": "Product Launch",
    "type": "URL",
    "slug": "xY7zW9qR",
    "isActive": true,
    "scanLimit": 500,
    "updatedAt": "2025-04-14T11:30:00.000Z"
  }
}
PATCH/v1/qr/:id/toggle

Toggle QR Code

Switches a QR code between active and inactive, and sends a qr.updated webhook event. When an inactive code is scanned, the visitor sees the deactivated page — or the code's fallback URL, if it has one. A code paused because your plan ended can only be switched back on by renewing.

Response Fields

NameTypeDescription
idstringQR code ID
isActivebooleanThe new active state
slugstringScan URL slug

Status Codes

200Active state flipped
401Invalid or missing API key
403Code was paused because your plan ended — renew to switch it back on
404QR code not found
bash
curl -X PATCH https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/toggle \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "id": "clxxxxxxxxxxxxxxxx",
    "isActive": false,
    "slug": "xY7zW9qR"
  }
}
DELETE/v1/qr/:id

Delete QR Code

Permanently deletes a QR code and all its associated scan data. This action is irreversible. If you only want to stop a QR code from accepting scans without losing data, use Toggle QR Code instead.

Response Fields

NameTypeDescription
(none)Success returns 204 No Content with an empty body

Status Codes

204QR code permanently deleted
401Invalid or missing API key
404QR code not found
bash
curl -X DELETE https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
HTTP/1.1 204 No Content

Analytics

Retrieve scan analytics for your QR codes.

GET/v1/qr/:id/analytics

QR Analytics

Returns scan analytics for a specific QR code: all-time totals, a daily timeline for the requested number of days, and breakdowns by device, OS, browser, country and city.

Query Parameters

NameTypeDescription
daysintegerDays covered by the timeline and breakdowns. Default: 30. Values above 90 are treated as 90

Response Fields

NameTypeDescription
totalScansintegerAll-time scan count, repeat scans included
uniqueScansintegerAll-time unique scans — repeats from the same IP and browser within 4 hours count once
scansTodayintegerScans in the current UTC day
scansThisWeekintegerScans in the last 7 days
scansThisMonthintegerScans in the last 30 days
timelinearrayDaily scan counts ({ date, count }) for the requested period
byDevicearrayScan counts by deviceType: MOBILE, TABLET, DESKTOP, UNKNOWN
byOSarrayScan counts per operating system
byBrowserarrayScan counts per browser
byCountryarrayTop 20 countries ({ country, countryCode, count })
byCityarrayTop 20 cities ({ city, region, country, countryCode, count })
recentScansarrayLatest 50 scans with time, IP, location, device, OS, browser and referrer

Status Codes

200Analytics returned
401Invalid or missing API key
404QR code not found
422days is not a whole number of 1 or more
bash
curl "https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/analytics?days=30" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "totalScans": 1243,
    "uniqueScans": 987,
    "scansToday": 18,
    "scansThisWeek": 140,
    "scansThisMonth": 512,
    "timeline": [
      { "date": "2025-04-13", "count": 42 },
      { "date": "2025-04-14", "count": 18 }
    ],
    "byDevice": [
      { "deviceType": "MOBILE", "count": 890 },
      { "deviceType": "DESKTOP", "count": 290 }
    ],
    "byOS": [{ "os": "Android", "count": 610 }],
    "byBrowser": [{ "browser": "Chrome", "count": 720 }],
    "byCountry": [
      { "country": "India", "countryCode": "IN", "count": 830 }
    ],
    "byCity": [
      { "city": "Mumbai", "region": "Maharashtra", "country": "India", "countryCode": "IN", "count": 214 }
    ],
    "recentScans": [ … ]
  }
}
GET/v1/qr/:id/scans

List Scans

Returns individual scans for a QR code, newest first. Each scan has a stable id, so polling integrations can de-duplicate.

Query Parameters

NameTypeDescription
limitintegerNumber of scans to return. Default: 25. Max: 100
sincestringISO 8601 timestamp — only scans at or after this time

Response Fields

NameTypeDescription
dataarrayArray of scan objects
data[].idstringScan ID
data[].scannedAtstringISO 8601 scan time
data[].countrystringCountry, with countryCode, city and region alongside
data[].deviceTypestringMOBILE, TABLET, DESKTOP or UNKNOWN
data[].os / browserstringOperating system and browser
data[].referrerstringReferer header, if the scanner sent one
data[].isUniquebooleanFalse for a repeat scan from the same device within 4 hours
data[].placeNamestringThe code's place when it was scanned, with placeId and placeCode (its location ID); null if none

Status Codes

200Scans returned
401Invalid or missing API key
404QR code not found
422Invalid query parameter
bash
curl "https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/scans?limit=25" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "clyyyyyyyyyyyyyyyy",
      "qrId": "clxxxxxxxxxxxxxxxx",
      "scannedAt": "2025-04-14T10:30:00.000Z",
      "country": "India",
      "countryCode": "IN",
      "city": "Mumbai",
      "region": "Maharashtra",
      "deviceType": "MOBILE",
      "os": "Android",
      "browser": "Chrome",
      "referrer": null,
      "isUnique": true,
      "placeId": "clzzzzzzzzzzzzzzzz",
      "placeName": "Millennium City Centre Metro",
      "placeCode": "DEL-MCC-01"
    }
  ]
}
GET/v1/places

List Places

Returns the places in your account — the spots your codes are printed at — with how many codes each has and how many scans each got. Use a place's id as placeId when creating or updating a code. Places are added in the dashboard (Places) or from a bulk upload's place column.

Response Fields

NameTypeDescription
data[].idstringPlace ID
data[].namestringPlace name
data[].codestringYour location ID for it, or null
data[].city / addressstringWhere it is, if set
data[].lat / lngnumberMap pin, if set
data[].codeCountintegerCodes at this place now
data[].totalScansintegerScans recorded at this place, all time
data[].scansInRangeintegerScans in the last 30 days

Status Codes

200Places returned
401Invalid or missing API key
bash
curl https://genxqr.com/v1/places \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "clzzzzzzzzzzzzzzzz",
      "name": "Millennium City Centre Metro",
      "code": "DEL-MCC-01",
      "address": "Exit 2",
      "city": "Gurugram",
      "lat": 28.4595,
      "lng": 77.0727,
      "codeCount": 2,
      "totalScans": 1840,
      "scansInRange": 312
    }
  ]
}

Webhooks — Overview

Webhooks let GenXQR push HTTP notifications to your server in real time when events occur in your account. Instead of polling the API, your server receives a POST request the moment something happens.

Create and manage webhooks from the Webhooks page in your dashboard. Each webhook has its own HMAC secret used to verify requests.

Webhooks require the Pro plan or higher, and each account can have up to 20. If the account moves below Pro, deliveries stop; the webhooks stay saved and resume when the plan does. URLs must use HTTPS and a public address. A delivery counts as successful on any 2xx response within 10 seconds; redirects are not followed and count as failures. Failed deliveries are retried up to 5 attempts in total, roughly 30 seconds, 2 minutes, 8 minutes and 32 minutes apart (retries are picked up once a minute). Each retry is signed afresh and carries a new timestamp. In a team workspace, changes made by members raise events on the workspace owner's webhooks. Integrations can manage webhooks over the API with the endpoints below.

POST https://your-server.com/webhook

Content-Type: application/json

X-GenXQR-Signature: sha256=<HMAC-SHA256>

X-GenXQR-Event: qr.scanned

X-GenXQR-Attempt: 1

User-Agent: GenXQR-Webhooks/1.0

Events & Payloads

Subscribe to any combination of the events below when creating a webhook. Every delivery uses the same envelope: { event, timestamp, data }.

qr.scanned

Fired for every recorded scan, including repeat scans from the same device (isUnique tells them apart). Scans that are turned away (code switched off, expired, or over a scan limit) are not recorded and fire nothing. data.id is the scan's own id — the same fields as List Scans, plus the code's name and slug. The scanner's IP address is never sent. name and slug repeat qrName and qrSlug for older integrations.

json
{
  "event": "qr.scanned",
  "timestamp": "2025-04-14T10:30:01.000Z",
  "data": {
    "id": "clyyyyyyyyyyyyyyyy",
    "qrId": "clxxxxxxxxxxxxxxxx",
    "qrName": "Restaurant Menu",
    "qrSlug": "aB3dE5fG",
    "name": "Restaurant Menu",
    "slug": "aB3dE5fG",
    "scannedAt": "2025-04-14T10:30:00.000Z",
    "country": "India",
    "countryCode": "IN",
    "city": "Mumbai",
    "region": "Maharashtra",
    "deviceType": "MOBILE",
    "os": "Android",
    "browser": "Chrome",
    "referrer": null,
    "isUnique": true,
    "placeId": "clzzzzzzzzzzzzzzzz",
    "placeName": "Millennium City Centre Metro",
    "placeCode": "DEL-MCC-01"
  }
}
qr.created

Fired when a new QR code is created — in the dashboard (including duplicates and each code from a bulk upload) or via the API. data.qr is the full QR code object.

json
{
  "event": "qr.created",
  "timestamp": "2025-04-14T10:00:00.000Z",
  "data": {
    "qr": {
      "id": "clxxxxxxxxxxxxxxxx",
      "name": "Product Launch",
      "type": "URL",
      "slug": "xY7zW9qR",
      "isActive": true,
      "createdAt": "2025-04-14T10:00:00.000Z"
    }
  }
}
qr.updated

Fired when a QR code's content, design or settings are edited, or when it is switched on or off. data.qr is the full updated QR code object.

json
{
  "event": "qr.updated",
  "timestamp": "2025-04-14T11:00:00.000Z",
  "data": {
    "qr": {
      "id": "clxxxxxxxxxxxxxxxx",
      "name": "Product Launch",
      "updatedAt": "2025-04-14T11:00:00.000Z"
    }
  }
}
qr.deleted

Fired when a QR code is permanently deleted.

json
{
  "event": "qr.deleted",
  "timestamp": "2025-04-14T12:00:00.000Z",
  "data": {
    "qrId": "clxxxxxxxxxxxxxxxx",
    "name": "Product Launch"
  }
}
subscription.activated

Fired when a payment activates or renews your plan.

json
{
  "event": "subscription.activated",
  "timestamp": "2025-04-14T12:00:00.000Z",
  "data": { "planName": "PRO", "billingCycle": "monthly" }
}
subscription.cancelled

Fired when you cancel your plan. It stays active until the end of the current period.

json
{
  "event": "subscription.cancelled",
  "timestamp": "2025-04-14T12:00:00.000Z",
  "data": { "cancelAtPeriodEnd": true }
}
test

Sent when you press Test on a webhook in the dashboard, whatever events it subscribes to. Delivered once, never retried.

json
{
  "event": "test",
  "timestamp": "2025-04-14T12:00:00.000Z",
  "data": {
    "message": "This is a test event from GenXQR",
    "webhookId": "clzzzzzzzzzzzzzzzz"
  }
}

Signature Verification

Every webhook request includes an X-GenXQR-Signature header containing sha256=<HMAC>. The HMAC is computed from the raw request body using your webhook secret. Always verify this before processing the payload.

Use timing-safe comparison when checking the signature. Standard string equality (===) is vulnerable to timing attacks. Use crypto.timingSafeEqual in Node.js or hmac.compare_digest in Python.

javascript
// Node.js — Express
const crypto = require('crypto')

app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const sig      = req.headers['x-genxqr-signature'] ?? ''  // Node lower-cases header names
  const body     = req.body   // raw Buffer — do NOT parse before verifying
  const secret   = process.env.GenXQR_WEBHOOK_SECRET

  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex')

  if (sig.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) {
    return res.status(401).send('Invalid signature')
  }

  const event = JSON.parse(body)
  console.log('Received:', event.event)

  // Acknowledge immediately, process asynchronously
  res.sendStatus(200)
  processEvent(event)
})
python
# Python — FastAPI
import hmac, hashlib, json, os
from fastapi import BackgroundTasks, Request, HTTPException

@app.post("/webhook")
async def handle_webhook(request: Request, background_tasks: BackgroundTasks):
    body   = await request.body()
    sig    = request.headers.get("x-genxqr-signature", "")
    secret = os.environ["GenXQR_WEBHOOK_SECRET"].encode()

    expected = "sha256=" + hmac.new(secret, body, hashlib.sha256).hexdigest()

    if not hmac.compare_digest(sig, expected):
        raise HTTPException(status_code=401, detail="Invalid signature")

    event = json.loads(body)
    print("Received:", event["event"])

    # Return 200 immediately, queue heavy processing
    background_tasks.add_task(process_event, event)
    return {"ok": True}

Webhook Subscriptions

Create and remove webhooks over the API — the REST-hook lifecycle used by Zapier, Make and n8n.

GET/v1/webhooks

List Webhooks

Returns every webhook on your account, newest first — including ones created in the dashboard. Secrets are not included; use Get Webhook for that.

Response Fields

NameTypeDescription
data[].idstringWebhook ID
data[].namestringDisplay name
data[].urlstringEndpoint that receives deliveries
data[].eventsstring[]Subscribed events
data[].isActivebooleanWhether deliveries are sent
data[].createdAtstringISO 8601 creation time
data[].deliveryCountintegerDelivery attempts recorded

Status Codes

200Webhooks returned
401Invalid or missing API key
bash
curl https://genxqr.com/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    {
      "id": "clwwwwwwwwwwwwwwww",
      "name": "zapier — qr.scanned",
      "url": "https://hooks.example.com/genxqr",
      "events": ["qr.scanned"],
      "isActive": true,
      "createdAt": "2025-04-14T10:00:00.000Z",
      "deliveryCount": 12
    }
  ]
}
POST/v1/webhooks

Subscribe

Creates a webhook for one event. This is the REST-hook subscribe call used by Zapier, Make and n8n: call it once per event you need. The response includes the signing secret for verifying deliveries; Get Webhook returns it again later.

Request Body

NameTypeDescription
url*stringHTTPS endpoint to deliver to. Private, loopback and link-local addresses are refused
event*stringOne event name from List Events (e.g. qr.scanned)
namestringDisplay name, max 64 characters. Default: "<source> — <event>"
sourcestringOptional label: zapier, make or n8n

* Required

Response Fields

NameTypeDescription
idstringWebhook ID — keep it to unsubscribe
secretstringHMAC signing secret for X-GenXQR-Signature
…Plus every field from List Webhooks

Status Codes

201Webhook created
400URL not allowed (not HTTPS, or a private address), or the 20-webhook limit is reached
401Invalid or missing API key
422Missing url, not a URL, or an unknown event
bash
curl -X POST https://genxqr.com/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://hooks.example.com/genxqr", "event": "qr.scanned" }'
Response
{
  "success": true,
  "data": {
    "id": "clwwwwwwwwwwwwwwww",
    "name": "integration — qr.scanned",
    "url": "https://hooks.example.com/genxqr",
    "events": ["qr.scanned"],
    "isActive": true,
    "createdAt": "2025-04-14T10:00:00.000Z",
    "deliveryCount": 0,
    "secret": "3f9c…"
  }
}
GET/v1/webhooks/:id

Get Webhook

Returns one webhook including its signing secret and source. Anyone holding your API key can read secrets this way, which is one more reason to keep keys server-side.

Response Fields

NameTypeDescription
secretstringHMAC signing secret
sourcestring|nullzapier, make, n8n, or null for dashboard webhooks
…Plus every field from List Webhooks

Status Codes

200Webhook returned
401Invalid or missing API key
404Webhook not found or belongs to another account
bash
curl https://genxqr.com/v1/webhooks/clwwwwwwwwwwwwwwww \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "id": "clwwwwwwwwwwwwwwww",
    "name": "n8n — qr.created",
    "url": "https://n8n.example.com/webhook/abc",
    "events": ["qr.created"],
    "isActive": true,
    "createdAt": "2025-04-14T10:00:00.000Z",
    "deliveryCount": 3,
    "secret": "3f9c…",
    "source": "n8n"
  }
}
DELETE/v1/webhooks/:id

Unsubscribe

Deletes a webhook and its delivery history. Integrations call this when a Zap, scenario or workflow is turned off.

Response Fields

NameTypeDescription
(none)Success returns 204 No Content with an empty body

Status Codes

204Webhook deleted
401Invalid or missing API key
404Webhook not found or belongs to another account
bash
curl -X DELETE https://genxqr.com/v1/webhooks/clwwwwwwwwwwwwwwww \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
HTTP/1.1 204 No Content
GET/v1/events

List Events

Returns the event names a webhook can subscribe to, for building an event picker. Requires an API key like every /v1 endpoint.

Response Fields

NameTypeDescription
datastring[]Event names

Status Codes

200Events returned
401Invalid or missing API key
bash
curl https://genxqr.com/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true,
  "data": [
    "qr.created", "qr.updated", "qr.deleted", "qr.scanned", "form.submitted",
    "subscription.activated", "subscription.cancelled", "test"
  ]
}

Content Schemas

The content field structure depends on the QR type. Below are examples for the most common types.

URL
{ "data": { "url": "https://example.com" } }
WIFI
{ "data": { "ssid": "My Network", "password": "secret", "security": "WPA" } }
// security: WPA, WEP, or nopass for an open network
WHATSAPP
{ "data": { "phone": "+919876543210", "message": "Hello!" } }
INSTAGRAM
{ "data": { "username": "yourhandle" } }
VCARD
{ "data": { "fullName": "Raj Sharma", "organization": "Acme", "title": "Founder", "phone": "+91...", "email": "raj@..." } }
FACEBOOK
{ "data": { "url": "https://facebook.com/yourpage" } }
UPI
{ "data": { "upiId": "shop@okhdfcbank", "payeeName": "Blue Cafe", "amount": "250.00", "note": "Table 4" } }
// amount and note optional; a scan opens a payment page
EVENT
{ "data": { "title": "Diwali Mela", "start": "2026-11-20T19:00", "end": "2026-11-20T22:30", "timeZone": "Asia/Kolkata", "venue": "Cyber Hub", "link": "https://…" } }
// start/end: the event's local time in timeZone; end, venue, address, description, organizer, link optional
FORM
{ "data": { "title": "Feedback", "notify": true, "fields": [ { "id": "name", "label": "Name", "type": "text", "required": true }, { "id": "rating", "label": "How was it?", "type": "rating" } ] } }
// field types: text, textarea, email, phone, rating (1–5), select (with "options"); responses → form.submitted webhook
GOOGLE_REVIEW
{ "data": { "reviewUrl": "https://g.page/r/.../review" } }
// or { "placeId": "ChIJ..." }; a scan redirects to Google's review form

Ready to build?

Get your API key from the dashboard and make your first API call in under 60 seconds.

Questions? Contact support