Skip to main content

QR Codes API

The QR Codes API allows you to create, retrieve, list, and update dynamic QR codes programmatically.
All dynamic QR codes generated through the API behave exactly like those created in the QRForge Dashboard.


Base Path

All QR Code API endpoints use:

/v1/qr-codes

Example:

GET https://api.qrforge.link/v1/qr-codes

Object: QR Code

A QR Code resource uses the following structure:

{
"id": "wUF83EsmkvjkgdsRSCAE",
"name": "API happy path",
"slug": "qr-1ap99pp",
"status": "active",
"type": "url",
"project_id": "NDcK35kvVopZCn26gTm3",
"redirect_url": "https://example.com/api-happy",
"created_at": "2025-11-19T12:36:32.654Z",
"updated_at": "2025-11-19T12:36:36.092Z",
"last_rendered_at": "2025-11-19T12:36:47.697Z"
}

Field definitions:

FieldTypeDescription
idstringQR document ID
namestringDisplay name
slugstringPublic scan URL slug (qr-xxxxxxx)
statusstringactive or archived
typestringQR type (url, etc.)
project_idstringID of the project this QR belongs to
redirect_urlstringTarget redirect URL
created_attimestampCreation timestamp
updated_attimestampLast update
last_rendered_attimestampLast QR rendering completion time

List QR Codes

Retrieve all QR codes in the authenticated workspace.

GET /v1/qr-codes

Example — cURL

curl -X GET "https://api.qrforge.link/v1/qr-codes" \
-H "x-api-key: api_live_xxxxxxxxxxxxxxxxxxxxx"

Example — Response

{
"ok": true,
"items": [
{
"id": "kBfYQ8oD7wTsVOJiLMHk",
"project_id": "NDcK35kvVopZCn26gTm3",
"slug": null,
"name": "Minute Window Test 1",
"status": "active",
"type": "url",
"redirect_url": "https://example.com/rate-min-1",
"created_at": "2025-11-19T12:43:23.633Z",
"render_status": "pending"
}
]
}

Create a QR Code

Create a dynamic URL QR.

POST https://api.qrforge.link/v1/qr-codes
Content-Type: application/json

Body

{
"name": "API happy path",
"redirect_url": "https://example.com/api-happy",
"type": "url"
}

Example — cURL

curl -X POST "https://api.qrforge.link/v1/qr-codes" \
-H "x-api-key: api_live_xxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "API happy path",
"redirect_url": "https://example.com/api-happy",
"type": "url"
}'

Example — Response

{
"ok": true,
"qr_id": "wUF83EsmkvjkgdsRSCAE",
"project_id": "NDcK35kvVopZCn26gTm3",
"status": "active",
"slug": null
}

Retrieve a Single QR Code

GET https://api.qrforge.link/v1/qr-codes/{id}

Example — cURL

curl -X GET "https://api.qrforge.link/v1/qr-codes/wUF83EsmkvjkgdsRSCAE" \
-H "x-api-key: api_live_xxxxxxxxxxxxxxxxxxxxx"

Example — Response

{
"ok": true,
"id": "wUF83EsmkvjkgdsRSCAE",
"name": "API happy path",
"slug": "qr-1ap99pp",
"status": "active",
"type": "url",
"project_id": "NDcK35kvVopZCn26gTm3",
"redirect_url": "https://example.com/api-happy",
"created_at": "2025-11-19T12:36:32.654Z",
"updated_at": "2025-11-19T12:36:36.092Z",
"last_rendered_at": "2025-11-19T12:36:47.697Z"
}

Retrieve a QR Code by Slug

Retrieve a QR code using its public slug. This is useful for routing and public integrations.

GET /v1/qr-codes/find?slug={slug}

Example — cURL

curl -X GET "https://api.qrforge.link/v1/qr-codes/find?slug=qr-1ap99pp" \
-H "x-api-key: api_live_xxxxxxxxxxxxxxxxxxxxx"

Update a QR Code

Updates the QR Code — most commonly the redirect_url.

PATCH /v1/qr-codes/{qr_id}
Content-Type: application/json

Body

{
"redirect_url": "https://example.com/new-destination"
}

Example — cURL

curl -X PATCH "https://api.qrforge.link/v1/qr-codes/wUF83EsmkvjkgdsRSCAE" \
-H "x-api-key: api_live_xxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"redirect_url": "https://example.com/new-destination"
}'

Example — Response

{
"ok": true,
"id": "wUF83EsmkvjkgdsRSCAE",
"name": "API happy path",
"slug": "qr-1ap99pp",
"status": "active",
"type": "url",
"project_id": "NDcK35kvVopZCn26gTm3",
"redirect_url": "https://example.com/new-destination",
"created_at": "2025-11-19T12:36:32.654Z",
"updated_at": "2025-11-20T08:15:00.000Z",
"last_rendered_at": "2025-11-20T08:15:30.000Z"
}

Archive a QR Code

To archive a QR Code, update its status:

PATCH /v1/qr-codes/{id}
Body:
{
"status": "archived"
}

Best Practices

  • Use meaningful names such as “Homepage QR”, “Campaign A – CTA”.
  • Do not delete slugs; they are used in analytics and history.
  • Use archiving to manage active quota.
  • Always pass a project_id to maintain clean organization.
  • Use the slug lookup endpoint for fast public routing integrations.

Next: Analytics API