PUT
/
qrcodes
/
{qrcodeId}
JavaScript
import Codeqr from '@codeqr/ts';

const client = new Codeqr({
  apiKey: 'My API Key',
});

const qrCode = await client.qrcodes.update('qrcodeId');

console.log(qrCode.id);
{
  "id": "<string>",
  "domain": "<string>",
  "key": "<string>",
  "archived": false,
  "expiresAt": "<string>",
  "expiredUrl": "<string>",
  "password": "<string>",
  "externalId": "<string>",
  "trackConversion": false,
  "proxy": false,
  "title": "<string>",
  "description": "<string>",
  "image": "<string>",
  "utm_source": "<string>",
  "utm_medium": "<string>",
  "utm_campaign": "<string>",
  "utm_term": "<string>",
  "utm_content": "<string>",
  "rewrite": false,
  "doIndex": false,
  "flexible": false,
  "filled": false,
  "ios": "<string>",
  "android": "<string>",
  "geo": {},
  "static": false,
  "type": "url",
  "contentStatic": "<string>",
  "text": "<string>",
  "email": {},
  "wifi": {},
  "url": "<string>",
  "phone": "<string>",
  "vcard": {},
  "crypto": {},
  "sms": {},
  "facetime": {},
  "latlog": {},
  "logo": "<string>",
  "bgColor": "<string>",
  "fgColor": "<string>",
  "size": 123,
  "level": "<string>",
  "showLogo": false,
  "src": "<string>",
  "height": 123,
  "width": 123,
  "excavate": false,
  "userId": "<string>",
  "projectId": "<string>",
  "publicStats": false,
  "scans": 0,
  "lastClicked": "<string>",
  "leads": 0,
  "sales": 0,
  "saleAmount": 0,
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "tagId": "<string>",
  "tags": [
    {
      "id": "<string>",
      "name": "<string>",
      "color": "red"
    }
  ],
  "comments": "<string>",
  "notificationToken": "<string>",
  "preRedirection": false,
  "pageId": "<string>",
  "pageUrl": "<string>",
  "isFormMandatory": false
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

qrcodeId
string
required

The id of the QR Code to update. You may use either qrcodeId (obtained via /qrcodes/info endpoint) or externalId prefixed with ext_.

Body

application/json
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.

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.

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 }.

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:
["clux0rgak00011..."]
tagNames

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

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.

type
enum<string>

The type of content of the QR code.

Available options:
url,
text,
email,
wifi,
phone,
vcard,
crypto,
sms,
facetime,
latlog
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.

facetime
object | null

The FaceTime information of the QR code.

latlog
object | null

The latitude and longitude information of the QR code.

The logo of the QR code.

bgColor
string
default:#ffffff

The background color of the QR code.

fgColor
string
default:#000000

The foreground color of the QR code.

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
default:256

The height of the QR code.

width
number
default:256

The width of the QR code.

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.

frameColor
string
default:#000000

The color of the frame of the QR code.

frameText
string

The text of the frame of the QR code.

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 updated 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

static
boolean
default:false
required

If the QR code is static.

type
enum<string>
required

The type of the QR code.

Available options:
url,
text,
email,
wifi,
phone,
vcard,
crypto,
sms,
facetime,
latlog,
pix
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.

facetime
object | null
required

The FaceTime information of the QR code.

latlog
object | null
required

The latitude and longitude information of the QR code.

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.

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.

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.