QR Codes API
Programmatically create, update, and manage QR codes.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/qrcodes | List all QR codes |
POST | /v1/qrcodes | Create a QR code |
GET | /v1/qrcodes/:id | Get a QR code |
PATCH | /v1/qrcodes/:id | Update a QR code |
DELETE | /v1/qrcodes/:id | Delete a QR code |
Create a QR Code
POST /v1/qrcodes
Request Body
{
"name": "Spring Sale Campaign",
"destination_url": "https://example.com/spring-sale",
"short_code": "spring-sale",
"style": {
"dotsType": "rounded",
"dotsColor": "#2D5BFF",
"backgroundColor": "#ffffff",
"cornersSquareType": "extra-rounded",
"cornersSquareColor": "#2D5BFF",
"cornersDotType": "dot",
"cornersDotColor": "#2D5BFF"
}
} Parameters
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the QR code |
destination_url | string | Yes | URL to redirect to when scanned |
short_code | string | No | Custom short link slug (auto-generated if not provided) |
style | object | No | Customization options (see below) |
Style Options
| Field | Type | Options |
|---|---|---|
dotsType | string | square, dots, rounded, extra-rounded, classy, classy-rounded |
dotsColor | string | Hex color (e.g., #2D5BFF) |
backgroundColor | string | Hex color (e.g., #ffffff) |
cornersSquareType | string | square, dot, extra-rounded |
cornersSquareColor | string | Hex color |
cornersDotType | string | square, dot |
cornersDotColor | string | Hex color |
Response
{
"id": "qr_abc123xyz",
"name": "Spring Sale Campaign",
"destination_url": "https://example.com/spring-sale",
"short_code": "spring-sale",
"short_url": "https://qrcp.io/spring-sale",
"image_url": "https://cdn.qrcodepro.io/qr/qr_abc123xyz.png",
"status": "active",
"active": true,
"total_scans": 0,
"unique_scans": 0,
"created_at": "2026-02-05T12:00:00Z",
"updated_at": "2026-02-05T12:00:00Z"
} List QR Codes
GET /v1/qrcodes
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (default: 20, max: 100) |
status | string | Filter by status: active, paused, draft |
Response
{
"data": [
{
"id": "qr_abc123xyz",
"name": "Spring Sale Campaign",
"destination_url": "https://example.com/spring-sale",
"short_url": "https://qrcp.io/spring-sale",
"status": "active",
"total_scans": 1234,
"created_at": "2026-02-05T12:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"total_pages": 3
}
} Get a QR Code
GET /v1/qrcodes/:id
Returns full details for a single QR code, including style configuration.
Update a QR Code
PATCH /v1/qrcodes/:id
Request Body
Include only the fields you want to update:
{
"destination_url": "https://example.com/new-page",
"active": false
} Updatable Fields
name— Display namedestination_url— Redirect destinationactive— true/false to pause/resume
Note: Style cannot be updated after creation. To change style, create a new QR code.
Delete a QR Code
DELETE /v1/qrcodes/:id
Permanently deletes a QR code. This action cannot be undone. The short link will stop working immediately.
Response
{
"deleted": true,
"id": "qr_abc123xyz"
} Download QR Image
GET /v1/qrcodes/:id/download
Query Parameters
| Parameter | Type | Description |
|---|---|---|
format | string | png or svg (default: png) |
size | integer | Image size in pixels (default: 512, max: 2048) |
Returns the QR code image file directly (not JSON).
Example: Create and Download
# Create a QR code
curl -X POST https://api.qrcodepro.io/v1/qrcodes \
-H "Authorization: Bearer qrcp_live_xxx" \
-H "Content-Type: application/json" \
-d '{"name": "My QR", "destination_url": "https://example.com"}'
# Download the image
curl https://api.qrcodepro.io/v1/qrcodes/qr_abc123/download?format=svg \
-H "Authorization: Bearer qrcp_live_xxx" \
-o my-qr-code.svg