API Documentation
Use the WantQR API to create short links and QR codes directly from your app, script, or automation tool.
Get Your API Token
Create a free account to generate your API token and start making requests immediately.
1) Authentication
Send your API token in the X-API-Key header for every request. Generate your token from your account after signing up.
2) Endpoint
Method: POST
URL: https://wantqr.com/api/qrcodes
Content-Type: application/json
3) Required and common fields
Send a JSON body with these fields. Numeric color channels are clamped to 0-255.
| Field | Type | Default | Details |
|---|---|---|---|
original_url |
string | required for payload_type=url |
Destination URL (must be valid HTTP/HTTPS URL). |
payload_type |
string | url |
Allowed: url, wifi, phone, sms, email. |
wifi_ssid, wifi_security, wifi_password, wifi_hidden |
mixed | - | Used for payload_type=wifi. Security: WPA, WEP, NOPASS. |
phone_number |
string | - | Required when payload_type=phone. |
sms_number, sms_message |
mixed | - | sms_number required when payload_type=sms. |
email_address, email_subject, email_body |
mixed | - | email_address required when payload_type=email. |
link_type |
string | qr_code |
Allowed: qr_code, short_link. |
include_logo |
boolean | user default | Embed uploaded logo in QR. Requires uploaded logo in your account. |
direct_qr_mode |
boolean | false |
Only for link_type=qr_code. If true, QR points directly to original_url. |
module_style |
string | user default | QR module style. Common values: square, small_square, round1, soft, rounded. |
circle_radius |
number | user default | Range 0.0 - 0.5 in API input handling. |
quietzone_size |
integer | user default | Range 0 - 4. Controls white margin around QR. |
bg_color_light_modules |
boolean | user default | If true, light modules use the selected background color. |
qr_color_r, qr_color_g, qr_color_b |
integer | user defaults | Base finder color RGB channels, each 0-255. |
qr_finder_inner_color_r, qr_finder_inner_color_g, qr_finder_inner_color_b |
integer | falls back to qr_color_* |
Finder inner dot RGB channels, each 0-255. |
qr_body_color_r, qr_body_color_g, qr_body_color_b |
integer | user defaults | Main body module RGB channels, each 0-255. |
bg_color_r, bg_color_g, bg_color_b |
integer | user defaults (usually 255,255,255) |
Background RGB channels, each 0-255. |
cURL Example
curl -X POST \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_TOKEN" \
-d '{"payload_type":"wifi","wifi_ssid":"OfficeWiFi","wifi_security":"WPA","wifi_password":"secret123","link_type":"qr_code","direct_qr_mode":true}' \
https://wantqr.com/api/qrcodes
VBA (Excel/Access) Example
Tip: use VBA-JSON or a similar parser to read JSON.
Response example (success)
{
"short_link": "https://wantqr.com/ABC12345",
"short_code": "ABC12345",
"original_url": "https://example.com",
"link_type": "qr_code",
"direct_qr": true,
"qr_image_url": "https://wantqr.com/qrcodes/ABC12345.png",
"qr_image_path": "qrcodes/ABC12345.png"
}
