Create QR Code
Create a new QR code in your workspace.
POST
/qr-codesHeaders
| Header | Required | Description |
|---|---|---|
X-API-Key | Required | Your API key |
Content-Type | Required | application/json |
QR-Version | Optional | API version (e.g., 2026-02-16) |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Name for the QR code (max 100 chars) |
type | string | Required | QR code type (url, vCard, wifi, etc.) |
content | object | Required | Content data — varies by type. See QR Types. |
design | object | Optional | Design options. See Design or try the Builder. Cannot be used with template_id. |
template_id | string | Optional | Template ID to use for QR code design. See Templates. Cannot be used with design. |
folder_id | string | Optional | Folder ID to place the QR code in. Omit or use null for root. Requires Folders feature. |
tip
If you omit both design and template_id, default styling is applied automatically (black dots on white background, rounded style). You can use either template_id to apply a saved template, or provide design for custom styling, but not both.
Request
- cURL
- JavaScript
- Python
curl -X POST "https://integration-api.qr-build.com/qr-codes" \
-H "X-API-Key: qrb_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "My Website QR",
"type": "url",
"content": {
"type": "url",
"url": "https://example.com"
},
"design": {
"dots": {
"style": "rounded",
"color": "#6366f1"
}
}
}'
Using a Template:
curl -X POST "https://integration-api.qr-build.com/qr-codes" \
-H "X-API-Key: qrb_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "My Website QR",
"type": "url",
"content": {
"type": "url",
"url": "https://example.com"
},
"template_id": "tmpl-aBc123XyZ9"
}'
const response = await fetch(
"https://integration-api.qr-build.com/qr-codes",
{
method: "POST",
headers: {
"X-API-Key": "qrb_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My Website QR",
type: "url",
content: {
type: "url",
url: "https://example.com",
},
design: {
dots: {
style: "rounded",
color: "#6366f1",
},
},
}),
}
);
const data = await response.json();
Using a Template:
const response = await fetch(
"https://integration-api.qr-build.com/qr-codes",
{
method: "POST",
headers: {
"X-API-Key": "qrb_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My Website QR",
type: "url",
content: {
type: "url",
url: "https://example.com",
},
template_id: "tmpl-aBc123XyZ9",
}),
}
);
const data = await response.json();
import requests
response = requests.post(
"https://integration-api.qr-build.com/qr-codes",
headers={
"X-API-Key": "qrb_live_your_api_key_here",
"Content-Type": "application/json",
},
json={
"name": "My Website QR",
"type": "url",
"content": {
"type": "url",
"url": "https://example.com",
},
"design": {
"dots": {
"style": "rounded",
"color": "#6366f1",
}
},
},
)
data = response.json()
Using a Template:
import requests
response = requests.post(
"https://integration-api.qr-build.com/qr-codes",
headers={
"X-API-Key": "qrb_live_your_api_key_here",
"Content-Type": "application/json",
},
json={
"name": "My Website QR",
"type": "url",
"content": {
"type": "url",
"url": "https://example.com",
},
"template_id": "tmpl-aBc123XyZ9",
},
)
data = response.json()
Response
{
"object": "qr",
"success": true,
"data": {
"id": "qr-aBc123XyZ9",
"name": "My Website QR",
"type": "url",
"content": {
"url": "https://example.com"
},
"design": {
"dots": {
"style": "rounded",
"color": "#6366f1"
},
"corners": {
"style": "extra-rounded",
"color": "#000000"
},
"corners_dot": {
"style": "dot",
"color": "#000000"
},
"background": { "color": "#ffffff" },
"logo_url": null,
"margin": 10
},
"active": true,
"folder_id": "fld-aBc123XyZ9",
"folder_name": "Marketing Campaign",
"short_url": "https://qr-build.io/qr-aBc123XyZ9",
"created_at": "2026-02-16T10:30:00Z",
"updated_at": "2026-02-16T10:30:00Z"
}
}
Error — Validation
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": [
{ "field": "type", "message": "type is required" }
]
}
}
Error — Both design and template_id provided
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "You can use either 'design' or 'template_id', but not both"
}
}
Error — Limit Exceeded
{
"success": false,
"error": {
"code": "LIMIT_EXCEEDED",
"message": "Dynamic QR code limit exceeded"
}
}