REST API · v1

Automate QR Code Creation
with Our API

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.

Get API Key →View Reference

Quick Start

Three steps to your first programmatic QR code.

STEP 01

Get your API key

Log in to PurpleQR, open Settings → API Keys and create a new key. Copy and store it securely — it's shown only once.

STEP 02

POST to /v1/create

Send a JSON body with your apikey and the data you want to encode. Customise colours, patterns, and frames via optional fields.

STEP 03

Receive SVG + ID

The response includes a vector SVG string and a qrid you can use to retrieve or delete the QR later.

Endpoints

POST/v1/create

Generate 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>"
}
POST/v1/delete

Delete 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 }
POST/v1/list

List 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
  ]
}

Parameter Reference

All parameters for POST /v1/create. Optional params use sensible defaults.

ParameterRequiredTypeDescription
apikeyYesstringYour PurpleQR API key (starts with pqr_)
dataYesstringQR code content — URL, phone number, plain text, vCard, etc.
titleNostringHuman-readable label for your own reference
qrtypeNostring"static" (default) or "dynamic"
transparentNobooleanTransparent background (default: false)
backcolorNostringBackground hex color, e.g. "#FFFFFF"
frontcolorNostringForeground (dot) hex color, e.g. "#4B2D8F"
gradientNobooleanEnable gradient fill on dots (default: false)
radialNobooleanRadial gradient instead of linear (default: false)
gradient_colorNostringSecond gradient color
marker_out_colorNostringOuter finder-pattern color
marker_in_colorNostringInner finder-pattern (eye) color
patternNostringDot pattern: "default", "dots", "rounded", "classy", etc.
markerNostringOuter finder-pattern style
marker_inNostringInner finder-pattern style
outer_frameNostringFrame template id, e.g. "scanme", "rounded", "footer"
framelabelNostringFrame label text (default: "SCAN ME")
label_fontNostringFrame label font family
framecolorNostringFrame color

FAQ

Common questions about the PurpleQR API.

Ready to integrate?

Upgrade to Pro, generate your API key, and start creating QR codes in minutes.

Get Started Free →