Generate beautiful, fully-styled QR codes from any language or tool — in one HTTP request. Get an SVG back, store the ID, and manage your codes programmatically.
Three steps to your first programmatic QR code.
Log in to PurpleQR, open Settings → API Keys and create a new key. Copy and store it securely — it's shown only once.
Send a JSON body with your apikey and the data you want to encode. Customise colours, patterns, and frames via optional fields.
The response includes a vector SVG string and a qrid you can use to retrieve or delete the QR later.
/v1/createGenerate a new QR code. Returns the SVG and a unique qrid.
curl -X POST https://api.purpleqr.com/v1/create \
-H "Content-Type: application/json" \
-d '{
"apikey": "pqr_your_api_key_here",
"data": "https://purpleqr.com",
"title": "Homepage QR",
"frontcolor": "#4B2D8F",
"backcolor": "#FFFFFF",
"pattern": "dots",
"outer_frame": "scanme",
"framelabel": "SCAN ME"
}'Response
{
"success": true,
"qrid": "clxyz1234abcd",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>...</svg>"
}/v1/deleteDelete a QR code by its qrid.
curl -X POST https://api.purpleqr.com/v1/delete \
-H "Content-Type: application/json" \
-d '{
"apikey": "pqr_your_api_key_here",
"qrid": "clxyz1234abcd"
}'Response
{ "success": true }/v1/listList all your QR codes. Returns up to 100 per page.
curl -X POST https://api.purpleqr.com/v1/list \
-H "Content-Type: application/json" \
-d '{
"apikey": "pqr_your_api_key_here",
"pagination": 1
}'Response
{
"success": true,
"total": 42,
"data": [
{
"id": "clxyz1234abcd",
"title": "Homepage QR",
"data": "https://purpleqr.com",
"qrType": "static",
"scanCount": 17,
"createdAt": "2026-08-01T10:00:00.000Z"
}
// … up to 100 items per page
]
}All parameters for POST /v1/create. Optional params use sensible defaults.
| Parameter | Required | Type | Description |
|---|---|---|---|
apikey | Yes | string | Your PurpleQR API key (starts with pqr_) |
data | Yes | string | QR code content — URL, phone number, plain text, vCard, etc. |
title | No | string | Human-readable label for your own reference |
qrtype | No | string | "static" (default) or "dynamic" |
transparent | No | boolean | Transparent background (default: false) |
backcolor | No | string | Background hex color, e.g. "#FFFFFF" |
frontcolor | No | string | Foreground (dot) hex color, e.g. "#4B2D8F" |
gradient | No | boolean | Enable gradient fill on dots (default: false) |
radial | No | boolean | Radial gradient instead of linear (default: false) |
gradient_color | No | string | Second gradient color |
marker_out_color | No | string | Outer finder-pattern color |
marker_in_color | No | string | Inner finder-pattern (eye) color |
pattern | No | string | Dot pattern: "default", "dots", "rounded", "classy", etc. |
marker | No | string | Outer finder-pattern style |
marker_in | No | string | Inner finder-pattern style |
outer_frame | No | string | Frame template id, e.g. "scanme", "rounded", "footer" |
framelabel | No | string | Frame label text (default: "SCAN ME") |
label_font | No | string | Frame label font family |
framecolor | No | string | Frame color |
Common questions about the PurpleQR API.
Upgrade to Pro, generate your API key, and start creating QR codes in minutes.
Get Started Free →