Endpoints
The QRDex API is organized around REST. Base URL: https://qrdex.io/api/v1
GET
/api/v1/qr_codes
Retrieve a paginated list of QR codes belonging to your team.
Query Parameters
| Parameter |
Type |
Required |
Description |
page |
integer |
No |
Page number (default: 1) |
per_page |
integer |
No |
Results per page (default: 25, max: 100) |
qr_type |
string |
No |
Filter by type: url, email, telephone, sms, whatsapp, wifi |
Example Request
curl https://qrdex.io/api/v1/qr_codes \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"data": [
{
"id": 1,
"title": "My Website",
"qr_type": "url",
"short_url": "abc12xyz",
"full_short_url": "https://qrdex.io/abc12xyz",
"scans_count": 142,
"track_scans": true,
"foreground_color": "#000000",
"background_color": "#FFFFFF",
"shape": "rounded",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:22:00Z",
"image_url": "https://qrdex.io/api/v1/qr_codes/1/image"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"total_pages": 1
}
}
GET
/api/v1/qr_codes/:id
Retrieve a single QR code by its ID, including all type-specific fields.
Path Parameters
| Parameter |
Type |
Required |
Description |
id |
integer |
Yes |
The QR code ID |
Example Request
curl https://qrdex.io/api/v1/qr_codes/1 \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"data": {
"id": 1,
"title": "My Website",
"qr_type": "url",
"short_url": "abc12xyz",
"full_short_url": "https://qrdex.io/abc12xyz",
"scans_count": 142,
"track_scans": true,
"foreground_color": "#000000",
"background_color": "#FFFFFF",
"shape": "rounded",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:22:00Z",
"image_url": "https://qrdex.io/api/v1/qr_codes/1/image",
"url": "https://example.com",
"telephone_number": null,
"email_address": null,
"email_subject": null,
"message": null,
"wifi_ssid": null,
"wifi_encryption": null,
"wifi_password": null,
"wifi_hidden": null,
"redirect_url": "https://example.com",
"has_logo": false
}
}
GET
/api/v1/qr_codes/:id/image
Download the QR code as an SVG image. The image uses the QR code's configured foreground and background colors. Useful for embedding QR codes directly in your application.
Path Parameters
| Parameter |
Type |
Required |
Description |
id |
integer |
Yes |
The QR code ID |
Response
Returns an SVG image with Content-Type: image/svg+xml. You can embed this directly in an <img> tag or save it to a file.
Example Request
curl https://qrdex.io/api/v1/qr_codes/1/image \
-H "Authorization: Bearer YOUR_API_KEY" \
-o qr-code.svg
Usage
Every QR code response includes an image_url field — use it directly as an image source.
In HTML: <img src="https://qrdex.io/api/v1/qr_codes/1/image" alt="QR Code">
The SVG respects the QR code's foreground and background color settings.
Try it
SVG rendered from API response
POST
/api/v1/qr_codes
Create a new QR code. The required fields vary based on the qr_type you choose.
Body Parameters
All parameters are nested inside a qr_code object.
| Parameter |
Type |
Required |
Description |
title |
string |
Yes |
Display name for the QR code |
qr_type |
string |
Yes |
One of: url, email, telephone, sms, whatsapp, wifi |
url |
string |
Conditional |
Required when qr_type is "url" |
telephone_number |
string |
Conditional |
Required when qr_type is telephone, sms, or whatsapp |
email_address |
string |
Conditional |
Required when qr_type is "email" |
email_subject |
string |
No |
Subject line for email type |
message |
string |
No |
Body text for sms, whatsapp, or email types |
wifi_ssid |
string |
Conditional |
Required when qr_type is "wifi" |
wifi_encryption |
string |
No |
For wifi type: WPA, WEP, or nopass |
wifi_password |
string |
No |
Password for wifi type |
wifi_hidden |
boolean |
No |
Whether the wifi network is hidden |
foreground_color |
string |
No |
Hex color code (default: #000000) |
background_color |
string |
No |
Hex color code (default: #FFFFFF) |
shape |
string |
No |
QR code shape (default: rounded) |
track_scans |
boolean |
No |
Enable scan tracking (default: true) |
Example Request
curl -X POST https://qrdex.io/api/v1/qr_codes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"qr_code": {
"title": "My Website",
"qr_type": "url",
"url": "https://example.com"
}
}'
Example Response (201 Created)
{
"data": {
"id": 2,
"title": "My Website",
"qr_type": "url",
"short_url": "xk9m2pqr",
"full_short_url": "https://qrdex.io/xk9m2pqr",
"scans_count": 0,
"track_scans": true,
"foreground_color": "#000000",
"background_color": "#FFFFFF",
"shape": "rounded",
"created_at": "2025-01-31T12:00:00Z",
"updated_at": "2025-01-31T12:00:00Z",
"image_url": "https://qrdex.io/api/v1/qr_codes/2/image"
}
}
PATCH
/api/v1/qr_codes/:id
Update an existing QR code. Only the fields you provide will be changed; all other fields remain unchanged.
Path Parameters
| Parameter |
Type |
Required |
Description |
id |
integer |
Yes |
The QR code ID |
Body Parameters
Same parameters as the Create endpoint (nested inside qr_code), but all fields are optional. Only provided fields are updated.
Example Request
curl -X PATCH https://qrdex.io/api/v1/qr_codes/1 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"qr_code": {
"title": "Updated Title"
}
}'
DELETE
/api/v1/qr_codes/:id
Soft-delete a QR code. The QR code will no longer be active or scannable, but the record is retained.
Path Parameters
| Parameter |
Type |
Required |
Description |
id |
integer |
Yes |
The QR code ID |
Example Request
curl -X DELETE https://qrdex.io/api/v1/qr_codes/1 \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"data": {
"id": 1,
"deleted": true
}
}
Ready to get started?
Create a free account to get your API key and start generating QR codes programmatically in minutes.
Sign Up and Get API Key