QR Code¶
Generate QR codes from structured input and download via pre-signed URL or inline base64 data URI.
All endpoints share common style parameters: size, fg_color,
bg_color, error_correction, margin, ttl, and format.
Common Style Parameters¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
no |
Output format: |
|
body |
no |
Image size 100–2000 px (default 400, ignored for SVG) |
|
body |
no |
Foreground hex color (default |
|
body |
no |
Background hex color (default |
|
body |
no |
Error correction level: |
|
body |
no |
Quiet zone width in modules, 0–20 (default 4) |
|
body |
no |
Pre-signed URL expiry in seconds, 60–2592000 (default 86400, ignored for base64) |
Text¶
POST /api/v1/qr/text¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Text to encode (max 4296 chars) |
Example
curl -X POST https://api.apicrate.io/api/v1/qr/text \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Hello!", "format": "base64"}'
{
"status": "ok",
"data": {
"data_uri": "data:image/png;base64,iVBORw0KGgo...",
"format": "base64",
"preset": "text"
}
}
URL¶
POST /api/v1/qr/url¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
URL to encode (max 2048 chars) |
WiFi¶
POST /api/v1/qr/wifi¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Network name (max 32 chars) |
|
body |
no |
Network password (max 63 chars) |
|
body |
no |
|
|
body |
no |
Whether network is hidden (default false) |
Example
curl -X POST https://api.apicrate.io/api/v1/qr/wifi \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{"ssid": "GuestNet", "password": "welcome", "format": "png"}'
{
"status": "ok",
"data": {
"url": "https://s3.example.com/qr/abc.png?X-Amz-...",
"format": "png",
"expires": 1744819200,
"preset": "wifi"
}
}
vCard¶
POST /api/v1/qr/vcard¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Contact full name |
|
body |
no |
Phone number |
|
body |
no |
Email address |
|
body |
no |
Organization name |
|
body |
no |
Mailing address |
|
body |
no |
Website URL |
Email¶
POST /api/v1/qr/email¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Recipient email address |
|
body |
no |
Pre-filled subject line |
|
body |
no |
Pre-filled email body |
SMS¶
POST /api/v1/qr/sms¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Phone number |
|
body |
no |
Pre-filled SMS message (max 160 chars) |
Geo¶
POST /api/v1/qr/geo¶
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Latitude (-90 to 90) |
|
body |
yes |
Longitude (-180 to 180) |