Appearance
Dynamic Links
Create QR codes with editable destination URLs. Change where your QR codes point without reprinting.
Overview
Dynamic links create a short URL that redirects to your target URL. You can update the target URL anytime through the API or dashboard—the QR code stays the same.
Flow:
- Create a dynamic link → Get short code (e.g.,
abc123) - Generate QR code for
https://www.qrcodeapi.io/r/abc123 - When scanned, redirects to your target URL
- Update target URL anytime—QR code stays valid
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/links | List all links |
| GET | /api/links?id={id} | Get single link |
| POST | /api/links | Create new link |
| PUT | /api/links?id={id} | Update link |
| DELETE | /api/links?id={id} | Delete link |
Create Link
POST /api/linksRequest Body
json
{
"name": "Winter Campaign",
"targetUrl": "https://example.com/winter-sale"
}| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Friendly name for the link |
targetUrl | string | ✅ | Destination URL |
Response
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Winter Campaign",
"shortCode": "abc123",
"targetUrl": "https://example.com/winter-sale",
"scanCount": 0,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}Example
bash
curl -X POST "https://www.qrcodeapi.io/api/links" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Winter Campaign",
"targetUrl": "https://example.com/winter-sale"
}'List Links
GET /api/linksResponse
json
{
"links": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Winter Campaign",
"shortCode": "abc123",
"targetUrl": "https://example.com/winter-sale",
"scanCount": 1247,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Product Page",
"shortCode": "xyz789",
"targetUrl": "https://example.com/product",
"scanCount": 523,
"createdAt": "2024-01-10T08:00:00Z",
"updatedAt": "2024-01-12T14:20:00Z"
}
]
}Example
bash
curl "https://www.qrcodeapi.io/api/links" \
-H "Authorization: Bearer YOUR_API_KEY"Get Single Link
GET /api/links?id={linkId}Example
bash
curl "https://www.qrcodeapi.io/api/links?id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"Update Link
PUT /api/links?id={linkId}Request Body
json
{
"name": "Spring Campaign",
"targetUrl": "https://example.com/spring-sale"
}Both fields are optional—only include what you want to update.
Example
bash
curl -X PUT "https://www.qrcodeapi.io/api/links?id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://example.com/spring-sale"
}'Delete Link
DELETE /api/links?id={linkId}Warning
Deleting a link will make all QR codes pointing to it non-functional. This action cannot be undone.
Example
bash
curl -X DELETE "https://www.qrcodeapi.io/api/links?id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"Complete Workflow
1. Create the Dynamic Link
bash
LINK=$(curl -s -X POST "https://www.qrcodeapi.io/api/links" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Menu", "targetUrl": "https://restaurant.com/menu"}')
SHORT_CODE=$(echo $LINK | jq -r '.shortCode')
echo "Short code: $SHORT_CODE"2. Generate the QR Code
bash
curl "https://www.qrcodeapi.io/api/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
--data-urlencode "data=https://www.qrcodeapi.io/r/${SHORT_CODE}" \
--data "size=500" \
-o menu-qr.png3. Update the Destination (Later)
bash
curl -X PUT "https://www.qrcodeapi.io/api/links?id=${LINK_ID}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"targetUrl": "https://restaurant.com/summer-menu"}'The same QR code now points to the summer menu!
Use Cases
| Use Case | Benefit |
|---|---|
| Restaurant Menus | Update menu without reprinting table cards |
| Product Packaging | Change product pages after shipping |
| Marketing Campaigns | A/B test landing pages |
| Event Materials | Update schedule links dynamically |
| Business Cards | Update your portfolio link anytime |
Limits by Plan
| Plan | Dynamic Links |
|---|---|
| Free | 5 |
| Starter | 50 |
| Pro | 500 |
| Enterprise | Unlimited |
Related
- Analytics - Track scans
- Generate QR Code - Create QR codes
- Dynamic QR Codes Guide - Best practices