tracqr← Back to home

Docs

Developer API

Manage QR codes and retrieve scan analytics programmatically. Requires a Pro subscription.

Overview

The tracqr REST API lets you create, list, and delete QR codes, and page through raw scan events — all from your own code or automation pipelines.

DetailValue
Base URLhttps://tracqr.io/api/v1
FormatJSON (application/json)
AuthBearer token (API key)
Plan requiredPro

Authentication

Generate an API key from Dashboard → Settings. Pass it as a Bearer token on every request:

Authorization: Bearer tracqr_<your-key>

Keys are hashed before storage — tracqr never sees your raw key after you copy it. If you lose it, revoke the old key from Dashboard → Settings and generate a replacement.

Rate limiting

Requests are limited to 60 per minute per API key. Every response includes these headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute (60)
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetUnix timestamp (seconds) when the window resets

When the limit is exceeded the API returns 429 Too Many Requests. Back off and retry after X-RateLimit-Reset.


Endpoints

GET/api/v1/codes

Returns all QR codes belonging to the authenticated user, newest first.

Response

{
  "codes": [
    {
      "id": "ab12cd34",
      "label": "Summer campaign",
      "destination": "https://example.com/landing",
      "redirect_url": "https://tracqr.io/r/ab12cd34",
      "expires_at": null,
      "created_at": "2026-06-01T12:00:00.000Z",
      "scan_count": 142,
      "is_expired": false
    }
  ]
}
POST/api/v1/codes

Creates a new QR code. Pro accounts may have at most 100 QR codes.

Request body

FieldTypeRequiredDescription
destinationstringYesThe URL the QR code redirects to (http or https)
labelstringNoHuman-readable label shown in the dashboard
expires_atstringNoISO 8601 date/time after which the redirect is inactive
{
  "destination": "https://example.com/landing",
  "label": "Summer campaign",
  "expires_at": "2026-12-31T23:59:59.000Z"
}

Response 201 Created

{
  "id": "ab12cd34",
  "redirect_url": "https://tracqr.io/r/ab12cd34",
  "created_at": "2026-06-27T09:00:00.000Z"
}
DELETE/api/v1/codes/{id}

Permanently deletes a QR code and all of its scan history. This action cannot be undone.

Response 204 No Content

Empty body on success. Returns 404 if the code does not exist or belongs to a different account.

GET/api/v1/codes/{id}/scans

Returns paginated scan events for a single QR code, oldest first.

Query parameters

ParameterDefaultMaxDescription
limit50200Number of scan events to return
offset0Number of scan events to skip (for pagination)

Response

{
  "scans": [
    {
      "scanned_at": "2026-06-15T08:34:12.000Z",
      "country": "US",
      "city": "New York",
      "device_type": "mobile"
    }
  ],
  "total": 142,
  "limit": 50,
  "offset": 0
}

To page through all scans, increment offset by limit until offset >= total.


Errors

All errors return JSON with a single error field:

{ "error": "Human-readable description" }
StatusMeaning
400Bad request — missing or invalid field in the request body
401Unauthorized — missing, malformed, or revoked API key
403Forbidden — Pro subscription required, or QR code limit reached
404Not found — QR code ID does not exist or belongs to another account
429Too Many Requests — rate limit exceeded; retry after X-RateLimit-Reset
500Internal server error

Need a Pro plan to get started?

API access is included in tracqr Pro. Generate your first key from Settings once you upgrade.

View pricing