Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
type
enum<string>
required

The type of content of the QR code.

Available options:
url,
text,
email,
wifi,
phone,
vcard,
crypto,
sms,
facetime,
geo,
latlog,
pix,
whatsapp
domain
string

The domain of the QR code. If not provided, the main domain of the project will be used (or codeqr.link if the project does not have domains).

key
string

The slug of the QR code. If not provided, a random slug of 7 characters will be generated.

prefix
string

The prefix for the randomly generated key. If provided, the key will be prefixed with this value.

externalId
string | null

This is the ID of the QR code in your database. If defined, it can be used to identify the QR code in the future. It must be prefixed with ext_ when passed as a query parameter.

Required string length: 1 - 255
Example:

"123456"

trackConversion
boolean
default:false

If should track conversions for the QR code.

templateId
string | null

ID of a QR code (in the same project) marked as a template. Its customization fields (colors, logo, pattern, shape, frame) will be applied to the new QR code unless explicitly overridden.

useAsTemplate
boolean
default:false

Whether this QR code should be used as a reusable template.

archived
boolean
default:false

If the QR code is archived.

expiresAt
string<date-time> | null

The date and time the QR code will expire in ISO-8601 format. Must be in the future.

expiredUrl
string | null

The URL to redirect when the QR code expires.

password
string | null

The password required to access the destination URL of the QR code.

proxy
boolean
default:false

If the QR code uses the custom link preview feature.

title
string | null

The title of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

description
string | null

The description of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

image
string | null

The image of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

rewrite
boolean
default:false

If the QR code uses link cloaking.

ios
string | null

The destination URL for iOS for the QR code for device targeting iOS.

android
string | null

The destination URL for Android for the QR code for device targeting Android.

geo
object | null

Geographic segmentation information for the QR code in the JSON format {[COUNTRY]: https://example.com }.

rules
object[] | null

Smart rules for conditional destination routing by request attribute.

Maximum array length: 20
doIndex
boolean
default:false

Allow search engines to index your QR code. The default is false if not provided. Learn more: https://codeqr.link/noindex

webhookIds
string[] | null

An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.

publicStats
boolean
default:false

If the statistics of the QR code are publicly accessible.

tagId
string | null
deprecated

The unique ID of the tag assigned to the QR code. This field is deprecated – use tagIds instead.

tagIds

The unique IDs of the tags assigned to the QR code.

Example:
tagNames

The unique name of the tags assigned to the QR code (case insensitive).

folderId
string | null

The unique ID of the folder assigned to the QR code. Omit or set to null for no folder.

comments
string | null

The comments for the QR code.

flexible
boolean
default:false

If the QR code is flexible.

filled
boolean
default:false

If the QR code is filled.

static
boolean
default:false

If the QR code is static.

useDisplayPage
boolean
default:true

For dynamic QR codes with phone, email, or sms types: if true (default), shows an action page with buttons. If false, redirects directly to tel:/mailto:/sms: URI.

contentStatic
string | null

The static content of the QR code.

text
string | null

The text of the QR code.

email
object | null

The email information of the QR code.

wifi
object | null

The WiFi information of the QR code.

url
string | null

The destination URL of the QR code.

phone
string | null

The phone number of the QR code.

vcard
object | null

The vCard information of the QR code.

crypto
object | null

The cryptocurrency information of the QR code.

sms
object | null

The SMS information of the QR code.

whatsapp
object | null

The WhatsApp click-to-chat info: E.164 number (digits only) and optional prefilled message.

facetime
object | null

The FaceTime information of the QR code.

latlog
object | null

The latitude and longitude information of the QR code.

logo
string | null

The logo of the QR code.

bgColor
string
default:#ffffff

The background color of the QR code (hex or CSS keyword). Invalid values are coerced to default.

fgColor
string
default:#000000

The foreground color of the QR code (hex or CSS keyword). Invalid values are coerced to default.

size
number
default:1024

The size of the QR code.

level
string
default:M

The level of error correction of the QR code.

If the logo should be displayed in the QR code.

src
string | null

The image URL of the QR code.

height
number

Logo height in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).

width
number

Logo width in pixels. When omitted, a proportional size is used based on the QR code size (about 10–20% depending on size).

excavate
boolean
default:true

If the QR code should have excavated areas.

pattern
string
default:default

The pattern of the modules of the QR code.

shape
string
default:none

The shape of the design around the QR code (none, square, circle).

frame
string
default:none

The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5, frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at render.

frameColor
string
default:#000000

The color of the frame (hex or CSS keyword). Invalid values are coerced to default.

frameText
string

Label text rendered inside the frame (e.g. "SCAN ME", a product SKU). Maximum 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar grows vertically to fit.

Maximum string length: 200
Example:

"SKU-LH905461"

frameTextColor
string | null

Color of the frame label text (hex #RRGGBB, #RGB, #RRGGBBAA, or a CSS keyword from the allowlist). When omitted, a contrasting color is derived automatically from frameColor.

Example:

"#ffffff"

frameTextStyles
object | null

Typographic styles applied to the frame label text. Every key is enum-gated — unknown keys or out-of-enum values are rejected to prevent SVG attribute injection. All fields are optional; omitted keys fall back to the default (normal weight, normal style, sans family, medium size).

Example:
preRedirection
boolean
default:false

If the QR code has pre-redirection.

pageId
string | null

The ID of the page to redirect to before the QR code destination.

pageUrl
string | null

The URL of the page to redirect to before the QR code destination.

isFormMandatory
boolean
default:false

If the form is mandatory for the page.

Response

The created QR Code

id
string
required

The unique ID of the QR code.

domain
string
required

The domain of the QR code. If not provided, the main domain of the project will be used (or codeqr.link if the project does not have domains).

key
string
required

The slug of the QR code. If not provided, a random slug of 7 characters will be generated.

archived
boolean
default:false
required

If the QR code is archived.

expiresAt
string | null
required

The date and time the QR code will expire in ISO-8601 format. Must be in the future.

expiredUrl
string | null
required

The destination URL when the QR code expires.

password
string | null
required

The password required to access the destination URL of the QR code.

externalId
string | null
required

The external ID associated with the QR code.

trackConversion
boolean
default:false
required

[BETA] If should track conversions for the QR code.

proxy
boolean
default:false
required

If the QR code uses the custom link preview feature.

title
string | null
required

The title of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

description
string | null
required

The description of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

image
string | null
required

The image of the QR code generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

utm_source
string | null
required

The source UTM of the QR code.

utm_medium
string | null
required

The medium UTM of the QR code.

utm_campaign
string | null
required

The campaign UTM of the QR code.

utm_term
string | null
required

The term UTM of the QR code.

utm_content
string | null
required

The content UTM of the QR code.

rewrite
boolean
default:false
required

If the QR code uses link cloaking.

doIndex
boolean
default:false
required

If the QR code should be indexed.

flexible
boolean
default:false
required

If the QR code is flexible.

filled
boolean
default:false
required

If the QR code is filled.

ios
string | null
required

The destination URL for iOS for the QR code for device targeting iOS.

android
string | null
required

The destination URL for Android for the QR code for device targeting Android.

geo
object | null
required

Geographic segmentation information for the QR code in the JSON format {[COUNTRY]: https://example.com }. Learn more: https://codeqr.link/geo

rules
object[] | null
required

Smart rules for conditional destination routing by request attribute.

static
boolean
default:false
required

If the QR code is static.

useDisplayPage
boolean
default:true
required

For dynamic QR codes with phone, email, or sms types: if true (default), shows an action page with buttons. If false, redirects directly to tel:/mailto:/sms: URI.

type
enum<string>
required

The type of the QR code.

Available options:
url,
text,
email,
wifi,
phone,
vcard,
crypto,
sms,
facetime,
geo,
latlog,
pix,
whatsapp
contentStatic
string | null
required

The static content of the QR code.

text
string | null
required

The text of the QR code.

email
object | null
required

The email information of the QR code.

wifi
object | null
required

The WiFi information of the QR code.

url
string | null
required

The URL of the QR code.

phone
string | null
required

The phone number of the QR code.

vcard
object | null
required

The vCard information of the QR code.

crypto
object | null
required

The cryptocurrency information of the QR code.

sms
object | null
required

The SMS information of the QR code.

whatsapp
object | null
required

The WhatsApp click-to-chat info: E.164 number (digits only) and optional prefilled message.

facetime
object | null
required

The FaceTime information of the QR code.

latlog
object | null
required

The latitude and longitude information of the QR code.

logo
string | null
required

The logo of the QR code.

bgColor
string
required

The background color of the QR code.

fgColor
string
required

The foreground color of the QR code.

size
number
required

The size of the QR code.

level
string
required

The level of error correction of the QR code.

If the logo should be displayed in the QR code.

src
string | null
required

The source of the QR code.

height
number
required

The height of the QR code.

width
number
required

The width of the QR code.

excavate
boolean
default:false
required

If the QR code should be excavated.

userId
string | null
required

The ID of the user that created the QR code.

projectId
string | null
required

The ID of the project of the QR code.

publicStats
boolean
default:false
required

If the statistics of the QR code are publicly accessible.

scans
number
default:0
required

The number of scans of the QR code.

lastClicked
string | null
required

The date and time the QR code was scanned last.

leads
number
default:0
required

The number of leads generated by the QR code.

sales
number
default:0
required

The number of sales generated by the QR code.

saleAmount
number
default:0
required

The amount of the sale generated by the link.

createdAt
string
required

The date and time the QR code was created.

updatedAt
string
required

The date and time the QR code was updated last.

tagId
string | null
required
deprecated

[DEPRECATED (use tags instead)]: The unique ID of the tag assigned to the QR code.

tags
Tag · object[] | null
required

The tags assigned to the QR code.

folderId
string | null
required

The unique ID of the folder assigned to the QR code.

comments
string | null
required

The comments for the QR code.

notificationToken
string | null
required

The notification token of the QR code.

preRedirection
boolean
default:false
required

If the QR code has pre-redirection.

isFormMandatory
boolean
default:false
required

If the form is mandatory for the page.

frameTextStyles
object | null

Typographic styles applied to the frame label text. Object with optional keys: weight (normal | bold), style (normal | italic), family (sans | sans-condensed | serif | serif-elegant | mono), size (s | m | l | xl). Every field is enum-gated on write; omitted keys render with defaults.

Example:
pageId
string | null

The ID of the page to redirect to before the QR code destination.

pageUrl
string | null

The URL of the page to redirect to before the QR code destination.