Skip to main content
POST
Create a QR code with every style of the QR designer: the QR of a new short link, the QR of a PDF, or a static QR code (Text, Wi-Fi, vCard and more). The same plan limits as the dashboard apply: QR codes and links per month, and paid styles.
Need only a plain link with a basic QR? POST /v1/generate still works, and its qr_template_id applies one of your QR templates to the link’s QR.

Types

Request body

Content fields

Emails must be valid addresses, websites must start with http:// or https://, and longer values are cut to the field’s length.

Design

Every key is optional. What you leave out comes from qr_template_id if you send one, otherwise from the workspace’s default template if one is set, otherwise from the defaults below.
On a Free plan a paid style gets a 403 whose data.paid_options lists the keys to change. Pick a free value, or upgrade your plan.

Response

  • data.id: ID of the QR code. Use it as url_id with Edit QR Code.
  • data.type: the type you created.
  • data.link: the short link for link and pdf, null for static types.
  • data.qr: the QR code as a PNG data URI, 1024 px wide.
  • data.created: true.

Errors

Every error has the standard envelope, and message says what to fix.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
type
enum<string>
required

link: a short link and its QR code. pdf: a short link that downloads the PDF in pdf_data. The others: a static QR code that holds content (no link, no redirect).

Available options:
link,
pdf,
text,
wifi,
vcard,
mecard,
location,
bitcoin,
email,
phone,
sms,
whatsapp
Example:

"link"

content
text · object

Fields of a static QR code, by type. Required on creation; on edit send only the fields to change.

Example:
url
string

link only: destination URL. Required on creation.

Maximum string length: 2048
Example:

"https://example.com/menu"

domain_id
integer

link and pdf: domain that hosts the short link. Required on creation.

Example:

1

pdf_data
string

pdf only: the PDF file, base64-encoded (a data:application/pdf;base64, prefix is accepted). 20 MB at most. Required on creation; on edit it replaces the file.

pdf_name
string

pdf only: file name used for the download, with pdf_data. Defaults to document.pdf.

Maximum string length: 200
Example:

"Menu.pdf"

design
object

Styles of the QR code, as in the QR designer. Send only what you want to change: the rest comes from qr_template_id, else from the QR being edited, else from the defaults. On a Free plan only the first two values of module_style, eye_frame_style and eye_ball_style, and none or box for frame_layout, can be saved.

Example:

Logo in the center of the code: none, the organization logo, or the image in logo_data. Omitted: the template's logo, else the QR's current one (edit), else none.

Available options:
none,
organization,
upload
logo_data
string

PNG, JPEG or SVG image, base64-encoded (a data URI is accepted), 2 MB at most. Sending it implies logo: "upload".

qr_template_id
integer

QR template of the organization used as the starting design and logo; design and logo override it. Left out, the workspace's default template is used if one is set; null means no template. Paid plans only.

Example:

7

workspace_id
integer

Workspace of a new QR code. Defaults to the first workspace of the organization. An edit never moves a QR code.

title
string

link and pdf: title in your lists. A PDF without one gets the file name. Static types get a title from their content.

Maximum string length: 256
notes
string

Private note.

Maximum string length: 300
custom_slug
string

link and pdf: branded slug instead of an auto-generated code.

Maximum string length: 64
folder_id
integer

link and pdf: folder of the link.

tag_ids
integer[]

link and pdf: tags of the link (same rules as the link endpoints).

param
object

link only: query parameters added to the destination URL (for example UTM tags).

redirect_type
enum<integer>

link and pdf: redirect status.

Available options:
301,
302
with_password
boolean

link and pdf: protects the link with url_password.

url_password
string

Password asked before the redirect (or the download).

Response

QR code created

success
boolean
required
Example:

true

status_code
integer
required
Example:

200

data
object
required
message
string
Example:

""