QR codes

Create QR codes with logo, colors, styles, and content types, then list or update them.

Supported types

Pass type as one of these keys. Content fields change with the type.

  • text
  • url
  • phone
  • sms
  • email
  • whatsapp
  • facetime
  • location
  • wifi
  • event
  • vcard
  • crypto
  • paypal
  • upi
  • epc
  • pix
POST/api/v1/qr-codes
Create QR code

Send JSON in the request body. name and type are required. For url types, pass url. Add style, colors, and qr_code_logo to match a designed code from the studio. File type is not available on the API.

NameTypeRequiredDefaultDescription
namestringYesLabel saved on the resource.
typestringYesurlContent type. One of the supported QR keys, except file.
urlstringNoDestination URL. Required when type is url.
textstringNoPlain text. Required when type is text. For bulk text, separate lines in this field.
url_dynamicbooleanNofalseIf true, a short link is created and the QR encodes that link so the destination can change later.
project_idintegerNoProject to attach the resource to.
is_bulkbooleanNofalseIf true and type is text, one QR is created per line in text.
stylestringNosquareModule shape. Examples: square, dot, rounded, heart, hexagon.
inner_eye_stylestringNosquareInner finder-pattern shape. Examples: square, dot, circle, rounded.
outer_eye_stylestringNosquareOuter finder-pattern shape. Examples: square, circle, rounded, flower.
sizeintegerNo500Image size in pixels, 50–2000.
marginintegerNo0Quiet-zone modules, 0–25.
eccstringNoMError correction: L, M, Q, or H. Use H when you add a logo.
foreground_typestringNocolorcolor or gradient.
foreground_colorstringNo#000000Module color as HEX.
foreground_gradient_stylestringNohorizontalvertical, horizontal, diagonal, inverse_diagonal, or radial.
foreground_gradient_onestringNoFirst gradient HEX color.
foreground_gradient_twostringNoSecond gradient HEX color.
background_colorstringNo#ffffffBackground HEX color. Keep it lighter than the modules.
background_color_transparencyintegerNo0Background transparency, 0–100.
custom_eyes_colorbooleanNofalseIf true, eyes use eyes_inner_color and eyes_outer_color.
eyes_inner_colorstringNo#000000Inner-eye HEX color.
eyes_outer_colorstringNo#000000Outer-eye HEX color.
qr_code_logostringNoLogo image URL or uploaded file key.
qr_code_logo_sizenumberNo25Logo size as a percent of the QR, 5–40.
framestringNoOptional frame key from the studio.
frame_textstringNoCaption drawn on the frame.

Content fields by type

NameTypeRequiredDefaultDescription
phonestringNoPhone number when type is phone.
smsstringNoPhone number when type is sms.
sms_bodystringNoSMS message body.
emailstringNoRecipient when type is email.
email_subjectstringNoEmail subject.
email_bodystringNoEmail body.
whatsappstringNoWhatsApp number, digits only.
whatsapp_bodystringNoWhatsApp prefilled text.
wifi_ssidstringNoNetwork name when type is wifi.
wifi_passwordstringNoWi-Fi password.
wifi_encryptionstringNoWPAnopass, WEP, WPA, or WPA/WPA2.
location_latitudenumberNoLatitude when type is location.
location_longitudenumberNoLongitude when type is location.
eventstringNoEvent title when type is event.
event_start_datetimestringNoISO datetime for the event start.
vcard first_name / last_name / emailstringNovCard fields: first_name, last_name, email, and the other studio keys.

Request example

curl -X POST 'https://forqrcode.com/api/v1/qr-codes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Website QR",
  "type": "url",
  "url": "https://forqrcode.com",
  "style": "rounded",
  "size": 500,
  "ecc": "M",
  "foreground_color": "#17191c",
  "background_color": "#ffffff",
  "qr_code_logo": "https://forqrcode.com/logo.png",
  "qr_code_logo_size": 25
}'

More examples

Gradient QR

curl -X POST 'https://forqrcode.com/api/v1/qr-codes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Gradient QR",
  "type": "url",
  "url": "https://forqrcode.com",
  "style": "dot",
  "inner_eye_style": "circle",
  "outer_eye_style": "rounded",
  "foreground_type": "gradient",
  "foreground_gradient_style": "radial",
  "foreground_gradient_one": "#5c8b29",
  "foreground_gradient_two": "#25492f",
  "background_color": "#ffffff",
  "size": 600
}'

Wi-Fi QR

curl -X POST 'https://forqrcode.com/api/v1/qr-codes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Office Wi-Fi",
  "type": "wifi",
  "wifi_ssid": "Guest",
  "wifi_password": "correct-horse",
  "wifi_encryption": "WPA",
  "style": "square",
  "ecc": "H"
}'

Response example

{
  "data": {
    "id": 1,
    "type": "url",
    "name": "Website QR",
    "qr_code": "https://…/qr-codes/…/qr.svg",
    "settings": {
      "style": "rounded",
      "size": 500,
      "ecc": "M"
    }
  }
}
GET/api/v1/qr-codes
List QR code
NameTypeRequiredDescription
pageintegerNoPage number (default 1)
results_per_pageintegerNoItems per page (default 25, max 100)
searchstringNoSearch term
search_bystringNoColumn to search
order_bystringNoSort column
order_typestringNoasc or desc
datetime_startstringNoISO datetime filter start
datetime_endstringNoISO datetime filter end
project_idintegerNo
typestringNo
curl -X GET 'https://forqrcode.com/api/v1/qr-codes' \
  -H 'Authorization: Bearer YOUR_API_KEY'
GET/api/v1/qr-codes/{id}
Read one QR code
NameTypeRequiredDescription
idintegerYes
curl -X GET 'https://forqrcode.com/api/v1/qr-codes/{id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
PATCH/api/v1/qr-codes/{id}
Update QR code
NameTypeRequiredDefaultDescription
idintegerYes
namestringNoLabel saved on the resource.
typestringNourlContent type. One of the supported QR keys, except file.
urlstringNoDestination URL. Required when type is url.
textstringNoPlain text. Required when type is text. For bulk text, separate lines in this field.
url_dynamicbooleanNofalseIf true, a short link is created and the QR encodes that link so the destination can change later.
project_idintegerNoProject to attach the resource to.
is_bulkbooleanNofalseIf true and type is text, one QR is created per line in text.
stylestringNosquareModule shape. Examples: square, dot, rounded, heart, hexagon.
inner_eye_stylestringNosquareInner finder-pattern shape. Examples: square, dot, circle, rounded.
outer_eye_stylestringNosquareOuter finder-pattern shape. Examples: square, circle, rounded, flower.
sizeintegerNo500Image size in pixels, 50–2000.
marginintegerNo0Quiet-zone modules, 0–25.
eccstringNoMError correction: L, M, Q, or H. Use H when you add a logo.
foreground_typestringNocolorcolor or gradient.
foreground_colorstringNo#000000Module color as HEX.
foreground_gradient_stylestringNohorizontalvertical, horizontal, diagonal, inverse_diagonal, or radial.
foreground_gradient_onestringNoFirst gradient HEX color.
foreground_gradient_twostringNoSecond gradient HEX color.
background_colorstringNo#ffffffBackground HEX color. Keep it lighter than the modules.
background_color_transparencyintegerNo0Background transparency, 0–100.
custom_eyes_colorbooleanNofalseIf true, eyes use eyes_inner_color and eyes_outer_color.
eyes_inner_colorstringNo#000000Inner-eye HEX color.
eyes_outer_colorstringNo#000000Outer-eye HEX color.
qr_code_logostringNoLogo image URL or uploaded file key.
qr_code_logo_sizenumberNo25Logo size as a percent of the QR, 5–40.
framestringNoOptional frame key from the studio.
frame_textstringNoCaption drawn on the frame.

Request example

curl -X PATCH 'https://forqrcode.com/api/v1/qr-codes/{id}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://forqrcode.com/pricing",
  "foreground_color": "#5d2a1a"
}'
DELETE/api/v1/qr-codes/{id}
Delete QR code
NameTypeRequiredDescription
idintegerYes
curl -X DELETE 'https://forqrcode.com/api/v1/qr-codes/{id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Parameter names and JSON examples are shown in English. Replace YOUR_API_KEY with a key from your account.