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.
| Detail | Value |
|---|---|
| Base URL | https://tracqr.io/api/v1 |
| Format | JSON (application/json) |
| Auth | Bearer token (API key) |
| Plan required | Pro |
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:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute (60) |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | Unix 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
/api/v1/codesReturns 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
}
]
}/api/v1/codesCreates a new QR code. Pro accounts may have at most 100 QR codes.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
destination | string | Yes | The URL the QR code redirects to (http or https) |
label | string | No | Human-readable label shown in the dashboard |
expires_at | string | No | ISO 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"
}/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.
/api/v1/codes/{id}/scansReturns paginated scan events for a single QR code, oldest first.
Query parameters
| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 50 | 200 | Number of scan events to return |
offset | 0 | — | Number 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" }| Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid field in the request body |
| 401 | Unauthorized — missing, malformed, or revoked API key |
| 403 | Forbidden — Pro subscription required, or QR code limit reached |
| 404 | Not found — QR code ID does not exist or belongs to another account |
| 429 | Too Many Requests — rate limit exceeded; retry after X-RateLimit-Reset |
| 500 | Internal 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