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.
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.
# 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.
| Limit | Value | Notes |
|---|---|---|
| Per-minute rate | 300 req / min | Per account, across all /v1 endpoints |
| Monthly quota | 10,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-After | Seconds to wait | Included in per-minute 429 responses |
# 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.
// Standard error response
{
"success": false,
"error": "Validation failed",
"details": {
"name": ["Required"],
"type": ["Invalid enum value. Expected 'URL' | 'PDF' | …, received 'LINK'"]
}
}| Code | Title | Description |
|---|---|---|
| 400 | Bad Request | The request is valid but can't be applied — for example an expiry date beyond your current subscription period, or an unusable webhook URL. |
| 401 | Unauthorized | Missing, invalid, revoked or expired API key. Ensure your Authorization header is set correctly. |
| 403 | Forbidden | Your 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. |
| 404 | Not Found | The requested resource doesn't exist or belongs to another account. |
| 422 | Unprocessable Entity | The request body or query parameters failed validation. The response includes a details object listing each invalid field. |
| 429 | Too Many Requests | You exceeded the per-minute rate limit (the response includes a Retry-After header) or your plan's monthly API call quota. |
| 500 | Internal Server Error | An 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.
# Request page 3, 50 items per page curl "https://genxqr.com/v1/qr?page=3&limit=50" \ -H "Authorization: Bearer YOUR_API_KEY"
// 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
| scannedAt | When it was scanned (UTC) |
| qrName / qrSlug / qrId | Which code |
| country, countryCode, region, city | Approximate location |
| deviceType | MOBILE, TABLET or DESKTOP |
| os | Android, iOS, Windows, macOS, Linux |
| browser | Chrome, Safari, Samsung Browser… |
| referrer | The referring page, if any |
| isUnique | First scan from this device in 4 hours |
| placeName / placeCode / placeId | The code's place when scanned (Places), if it has one |
| id | The 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- 1Open the GenXQR invite link for Zapier and accept it — this adds GenXQR to your Zapier account.
- 2Create a Zap. For the trigger choose GenXQR and an event (e.g. New QR Scan), then connect with your API key.
- 3Test the trigger: it shows up to 3 recent scans of your most recently updated code (scan one first if there are none).
- 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.
- 5Publish. Turning the Zap on adds a “Zapier — qr.scanned” webhook in GenXQR → Webhooks; turning it off removes it.
Make
Add GenXQR to Make- 1Open the GenXQR invite link for Make and install the app.
- 2Create a scenario, click +, and add GenXQR → Watch QR Scans (or another trigger).
- 3Click Create a webhook → Add, paste your API key and save — Make checks the key and registers its webhook in GenXQR.
- 4Add the next module (e.g. Google Sheets → Add a Row) and map the GenXQR fields.
- 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.
- 1Add a Webhook node (method POST) to a workflow and copy its Production URL.
- 2In GenXQR → Webhooks, add a webhook with that URL and the events you want (or create it with POST /v1/webhooks). Activate the workflow.
- 3Each delivery's body is { event, timestamp, data } — the scan fields are under data.
- 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).
- 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
- Claude: Settings → Connectors → Add custom connector. ChatGPT: add a custom connector (in developer mode, on plans where ChatGPT offers it).
- Name it GenXQR and enter the URL
https://genxqr.com/v1/mcp. Leave any client ID and secret fields empty. - Connect: you are sent to GenXQR, sign in if needed, and choose Allow. The app then works with your codes.
- 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
https://genxqr.com/v1/mcp # Header: Authorization: Bearer gxqr_live_...
Claude Code
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)
{
"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)
{
"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_codes | Your codes, newest first; filter by search, type, folder or place |
| get_qr_code | One code with its content, design, settings and scan URL |
| create_qr_code | A new dynamic code of any type (content as in Content Schemas) |
| update_qr_code | Change a code's name, content, tags, folder or place — the print keeps working |
| set_qr_code_active | Switch a code on or off |
| delete_qr_code | Delete a code permanently (assistants are told to confirm first) |
| get_qr_analytics | Scans over the last 1–90 days by day, country, city, device, OS and browser |
| list_places | Your places, for placeId |
| list_folders | Your 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.
/v1/qrList 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
| Name | Type | Description |
|---|---|---|
| page | integer | Page number, 1-indexed. Default: 1 |
| limit | integer | Results per page. Default: 20. Max: 50 |
| type | string | Filter by QR type (URL, PDF, WIFI, VCARD, …) |
| search | string | Matches QR code names or place names (partial, case-insensitive), an exact tag or a place's location ID |
| placeId | string | Only codes at this place (ids from List Places), or none for codes without a place |
| updatedSince | string | ISO 8601 timestamp — only QR codes updated at or after this time |
| sort | string | createdAt (default) or updatedAt — newest first |
Response Fields
| Name | Type | Description |
|---|---|---|
| data | array | Array of QR code objects |
| pagination.page | integer | Current page number |
| pagination.limit | integer | Results per page |
| pagination.total | integer | Total number of matching QR codes |
| pagination.totalPages | integer | Total number of pages |
| pagination.hasNext | boolean | Whether a later page exists |
| pagination.hasPrev | boolean | Whether an earlier page exists |
Status Codes
curl "https://genxqr.com/v1/qr?page=1&limit=20" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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
}
}/v1/qrCreate 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
| Name | Type | Description |
|---|---|---|
| name* | string | Display name for the QR code (max 200 characters) |
| type* | string | QR 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 |
| content | object | Type-specific content, wrapped as { data: { … } }. See Content Schemas below. |
| category | string | DYNAMIC (default) or STATIC |
| tags | string[] | Up to 10 tags, max 50 characters each |
| placeId | string | The place it is printed at (an id from List Places). Scans are then counted for that place |
| design | object | Colours, dot and corner styles, logo and frame — same fields as design in Get QR Code |
| settings | object | Optional: password, activeFrom, activeUntil, scanLimit, fallbackUrl, fbPixelId, gaId, gtmId, linkedinPartnerId, tiktokPixelId |
* Required
Response Fields
| Name | Type | Description |
|---|---|---|
| id | string | Unique QR code ID (CUID) |
| name | string | QR code display name |
| slug | string | Short identifier embedded in the scan URL |
| type | string | QR type |
| category | string | STATIC or DYNAMIC |
| isActive | boolean | Whether the QR code is currently active |
| createdAt | string | ISO 8601 creation timestamp |
Status Codes
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"]
}'{
"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"
}
}/v1/qr/:idGet QR Code
Retrieves a single QR code by its ID, including its content and design configuration.
Response Fields
| Name | Type | Description |
|---|---|---|
| id | string | Unique QR code ID |
| name | string | Display name |
| slug | string | Scan URL slug |
| type | string | QR type |
| scanCount | integer | Total number of scans recorded |
| content | object | Type-specific content data |
| design | object | Visual design configuration |
| isActive | boolean | Active state |
Status Codes
curl https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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"
}
}/v1/qr/:idUpdate 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
| Name | Type | Description |
|---|---|---|
| name | string | New display name |
| content | object | New type-specific content, as { data: { … } }. Replaces existing content entirely. |
| tags | string[] | Replace the tag list (max 10) |
| placeId | string | Move it to another place (null for none). Scans already recorded stay with the place they happened at |
| design | object | Design fields to change — fields you omit keep their current value |
| settings | object | password ("" removes it), activeFrom, activeUntil (ISO 8601, null to clear), scanLimit (null to clear), fallbackUrl, fbPixelId, gaId, gtmId, linkedinPartnerId, tiktokPixelId |
Response Fields
| Name | Type | Description |
|---|---|---|
| id | string | QR code ID |
| updatedAt | string | ISO 8601 timestamp of the update |
| … | Plus every other field returned by Get QR Code |
Status Codes
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 }
}'{
"success": true,
"data": {
"id": "clxxxxxxxxxxxxxxxx",
"name": "Product Launch",
"type": "URL",
"slug": "xY7zW9qR",
"isActive": true,
"scanLimit": 500,
"updatedAt": "2025-04-14T11:30:00.000Z"
}
}/v1/qr/:id/toggleToggle 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
| Name | Type | Description |
|---|---|---|
| id | string | QR code ID |
| isActive | boolean | The new active state |
| slug | string | Scan URL slug |
Status Codes
curl -X PATCH https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/toggle \ -H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": "clxxxxxxxxxxxxxxxx",
"isActive": false,
"slug": "xY7zW9qR"
}
}/v1/qr/:idDelete 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
| Name | Type | Description |
|---|---|---|
| (none) | Success returns 204 No Content with an empty body |
Status Codes
curl -X DELETE https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx \ -H "Authorization: Bearer YOUR_API_KEY"
HTTP/1.1 204 No Content
Analytics
Retrieve scan analytics for your QR codes.
/v1/qr/:id/analyticsQR 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
| Name | Type | Description |
|---|---|---|
| days | integer | Days covered by the timeline and breakdowns. Default: 30. Values above 90 are treated as 90 |
Response Fields
| Name | Type | Description |
|---|---|---|
| totalScans | integer | All-time scan count, repeat scans included |
| uniqueScans | integer | All-time unique scans — repeats from the same IP and browser within 4 hours count once |
| scansToday | integer | Scans in the current UTC day |
| scansThisWeek | integer | Scans in the last 7 days |
| scansThisMonth | integer | Scans in the last 30 days |
| timeline | array | Daily scan counts ({ date, count }) for the requested period |
| byDevice | array | Scan counts by deviceType: MOBILE, TABLET, DESKTOP, UNKNOWN |
| byOS | array | Scan counts per operating system |
| byBrowser | array | Scan counts per browser |
| byCountry | array | Top 20 countries ({ country, countryCode, count }) |
| byCity | array | Top 20 cities ({ city, region, country, countryCode, count }) |
| recentScans | array | Latest 50 scans with time, IP, location, device, OS, browser and referrer |
Status Codes
curl "https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/analytics?days=30" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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": [ … ]
}
}/v1/qr/:id/scansList Scans
Returns individual scans for a QR code, newest first. Each scan has a stable id, so polling integrations can de-duplicate.
Query Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Number of scans to return. Default: 25. Max: 100 |
| since | string | ISO 8601 timestamp — only scans at or after this time |
Response Fields
| Name | Type | Description |
|---|---|---|
| data | array | Array of scan objects |
| data[].id | string | Scan ID |
| data[].scannedAt | string | ISO 8601 scan time |
| data[].country | string | Country, with countryCode, city and region alongside |
| data[].deviceType | string | MOBILE, TABLET, DESKTOP or UNKNOWN |
| data[].os / browser | string | Operating system and browser |
| data[].referrer | string | Referer header, if the scanner sent one |
| data[].isUnique | boolean | False for a repeat scan from the same device within 4 hours |
| data[].placeName | string | The code's place when it was scanned, with placeId and placeCode (its location ID); null if none |
Status Codes
curl "https://genxqr.com/v1/qr/clxxxxxxxxxxxxxxxx/scans?limit=25" \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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"
}
]
}/v1/placesList 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
| Name | Type | Description |
|---|---|---|
| data[].id | string | Place ID |
| data[].name | string | Place name |
| data[].code | string | Your location ID for it, or null |
| data[].city / address | string | Where it is, if set |
| data[].lat / lng | number | Map pin, if set |
| data[].codeCount | integer | Codes at this place now |
| data[].totalScans | integer | Scans recorded at this place, all time |
| data[].scansInRange | integer | Scans in the last 30 days |
Status Codes
curl https://genxqr.com/v1/places \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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.scannedFired 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.
{
"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.createdFired 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.
{
"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.updatedFired 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.
{
"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.deletedFired when a QR code is permanently deleted.
{
"event": "qr.deleted",
"timestamp": "2025-04-14T12:00:00.000Z",
"data": {
"qrId": "clxxxxxxxxxxxxxxxx",
"name": "Product Launch"
}
}subscription.activatedFired when a payment activates or renews your plan.
{
"event": "subscription.activated",
"timestamp": "2025-04-14T12:00:00.000Z",
"data": { "planName": "PRO", "billingCycle": "monthly" }
}subscription.cancelledFired when you cancel your plan. It stays active until the end of the current period.
{
"event": "subscription.cancelled",
"timestamp": "2025-04-14T12:00:00.000Z",
"data": { "cancelAtPeriodEnd": true }
}testSent when you press Test on a webhook in the dashboard, whatever events it subscribes to. Delivered once, never retried.
{
"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.
// 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 — 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.
/v1/webhooksList 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
| Name | Type | Description |
|---|---|---|
| data[].id | string | Webhook ID |
| data[].name | string | Display name |
| data[].url | string | Endpoint that receives deliveries |
| data[].events | string[] | Subscribed events |
| data[].isActive | boolean | Whether deliveries are sent |
| data[].createdAt | string | ISO 8601 creation time |
| data[].deliveryCount | integer | Delivery attempts recorded |
Status Codes
curl https://genxqr.com/v1/webhooks \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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
}
]
}/v1/webhooksSubscribe
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
| Name | Type | Description |
|---|---|---|
| url* | string | HTTPS endpoint to deliver to. Private, loopback and link-local addresses are refused |
| event* | string | One event name from List Events (e.g. qr.scanned) |
| name | string | Display name, max 64 characters. Default: "<source> — <event>" |
| source | string | Optional label: zapier, make or n8n |
* Required
Response Fields
| Name | Type | Description |
|---|---|---|
| id | string | Webhook ID — keep it to unsubscribe |
| secret | string | HMAC signing secret for X-GenXQR-Signature |
| … | Plus every field from List Webhooks |
Status Codes
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" }'{
"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…"
}
}/v1/webhooks/:idGet 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
| Name | Type | Description |
|---|---|---|
| secret | string | HMAC signing secret |
| source | string|null | zapier, make, n8n, or null for dashboard webhooks |
| … | Plus every field from List Webhooks |
Status Codes
curl https://genxqr.com/v1/webhooks/clwwwwwwwwwwwwwwww \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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"
}
}/v1/webhooks/:idUnsubscribe
Deletes a webhook and its delivery history. Integrations call this when a Zap, scenario or workflow is turned off.
Response Fields
| Name | Type | Description |
|---|---|---|
| (none) | Success returns 204 No Content with an empty body |
Status Codes
curl -X DELETE https://genxqr.com/v1/webhooks/clwwwwwwwwwwwwwwww \ -H "Authorization: Bearer YOUR_API_KEY"
HTTP/1.1 204 No Content
/v1/eventsList 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
| Name | Type | Description |
|---|---|---|
| data | string[] | Event names |
Status Codes
curl https://genxqr.com/v1/events \ -H "Authorization: Bearer YOUR_API_KEY"
{
"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 networkWHATSAPP{ "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 pageEVENT{ "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 optionalFORM{ "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 webhookGOOGLE_REVIEW{ "data": { "reviewUrl": "https://g.page/r/.../review" } }
// or { "placeId": "ChIJ..." }; a scan redirects to Google's review formReady to build?
Get your API key from the dashboard and make your first API call in under 60 seconds.
Questions? Contact support