Skip to main content

QR Codes

QR code endpoints allow you to generate QR codes, manage QR code designs, and link QR codes to pages.

List QR Codes

Get a list of all QR codes in a project.

GET https://v1.freeqr.io/api/projects/{project}/qr_codes

Requires Authentication: Yes

Path Parameters

ParameterTypeRequiredDescription
projectstring (ULID)YesProject ID

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoItems per page (default: 10, max: 100)
sortstringNoSort field (default: id; prefix with - for descending)
filters[resource_id]string (ULID)NoFilter by resource ID

Response

{
"data": [
{
"id": "01arz3ndektsv4rrffq69g5fav",
"title": "My QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 640,
"margin": 4,
"error_correction": 1,
"text": "https://example.com/page",
"default_block_style": "heart",
"inner_corner_block_style": "inner-heart",
"outer_corner_block_style": "outer-square-drop-out",
"background_color": "255,255,255,1",
"foreground_color": "0,0,0,1",
"outer_corner_color": null,
"inner_corner_color": null,
"options": null,
"logo_file_id": null,
"logo_size": null,
"frame": null,
"freme_options": {},
"qr_design_template_id": null,
"index": 1,
"view": 0,
}
],
"meta": {
"total": 1
},
"included_files": []
}

Create QR Code

Create a new QR code in a project.

POST https://v1.freeqr.io/api/projects/{project}/qr_codes

Requires Authentication: Yes

Path Parameters

ParameterTypeRequiredDescription
projectstring (ULID)YesProject ID

Request Body

{
"title": "My QR Code",
"logo_file_id": "01arz3ndektsv4rrffq69g5fav",
"qr_design_template_id": "01arz3ndektsv4rrffq69g5fav",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 320,
"margin": 4,
"error_correction": 2,
"default_block_style": "square",
"inner_corner_block_style": "square",
"outer_corner_block_style": "square",
"background_color": "255,255,255,1",
"foreground_color": "0,0,0,1",
"outer_corner_color": "0,0,0,1",
"inner_corner_color": "0,0,0,1",
"logo_size": 20,
"frame": null,
"frame_options": {}
}

Parameters

ParameterTypeRequiredDescription
titlestringNoQR code title (max 60 characters)
logo_file_idstring (ULID)NoLogo file ID to embed
qr_design_template_idstring (ULID)NoQR design template ID. When provided, the template's current version config is merged with the design fields (margin, error_correction, colors, styles, etc.), where provided values override template config values. If design fields are empty or missing, template config values are used as defaults.
resource_typestringYesResource type (must be page)
resource_idstring (ULID)YesResource ID (page ID)
sizeintegerNoQR code size in pixels. Must be one of: 100, 320, 640, 960, 1280, 1920.
marginintegerNoMargin size. Overrides template config value when qr_design_template_id is set.
error_correctionintegerNoQR code error correction level (1, 2, 3, 4). This value is mapped to Endroid's correction level when generating the QR to control data redundancy. Higher levels improve resistance to damage/occlusion, but reduce max data capacity and can make the QR denser. If omitted, the system defaults to MEDIUM. Overrides template config value when qr_design_template_id is set.
default_block_stylestringNoDefault block style. Overrides template config value when qr_design_template_id is set.
inner_corner_block_stylestringNoInner corner block style. Overrides template config value when qr_design_template_id is set.
outer_corner_block_stylestringNoOuter corner block style. Overrides template config value when qr_design_template_id is set.
background_colorstringNoBackground color. See Color Formats for format details. Overrides template config value when qr_design_template_id is set.
foreground_colorstringNoForeground color. See Color Formats for format details. Overrides template config value when qr_design_template_id is set.
outer_corner_colorstringNoOuter corner color. See Color Formats for format details. Overrides template config value when qr_design_template_id is set.
inner_corner_colorstringNoInner corner color. See Color Formats for format details. Overrides template config value when qr_design_template_id is set.
logo_sizeintegerNoLogo size (integer 130, inclusive). Overrides template config value when qr_design_template_id is set.
framestring | nullNoFrame type (for example basic-bottom), or null for no frame. Overrides template config value when qr_design_template_id is set.
frame_optionsobjectNoFrame options. Overrides template config value when qr_design_template_id is set.

error_correction values

ValueLevel
1LOW
2MEDIUM
3QUARTILE
4HIGH

error_correction controls how much redundant data is embedded in the QR code. The value is mapped to Endroid correction levels during generation. Higher levels are more tolerant to damage or partial obstruction, but lower the maximum encodable payload and can produce visually denser QR patterns. When not provided, MEDIUM is used.

Response

{
"data": {
"id": "01arz3ndektsv4rrffq69g5faa",
"title": "My QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 320,
"margin": 4,
"error_correction": 2,
"text": "https://example.com/page",
"default_block_style": "square",
"inner_corner_block_style": "square",
"outer_corner_block_style": "square",
"background_color": "255,255,255,1",
"foreground_color": "0,0,0,1",
"outer_corner_color": "0,0,0,1",
"inner_corner_color": "0,0,0,1",
"options": null,
"logo_file_id": "01arz3ndektsv4rrffq69g5fav",
"logo_size": 20,
"frame": null,
"freme_options": {},
"qr_design_template_id": "01arz3ndektsv4rrffq69g5fav",
"index": 1,
"view": 0,
"qr_design_template": {},
}
}

Note: When qr_design_template_id is provided, the template's current version config is merged with the provided design fields (margin, error_correction, colors, styles, etc.), where provided values override template config values. This allows you to use template defaults while customizing specific design fields. If design fields are empty or missing, template config values are used as defaults.

Get QR Code

Get a specific QR code by ID.

GET https://v1.freeqr.io/api/qr_codes/{id}

Requires Authentication: Yes

Path Parameters

ParameterTypeRequiredDescription
idstring (ULID)YesQR code ID

Response

{
"data": {
"id": "01arz3ndektsv4rrffq69g5fav",
"title": "My QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 640,
"margin": 4,
"error_correction": 1,
"text": "https://example.com/page",
"default_block_style": "heart",
"inner_corner_block_style": "inner-heart",
"outer_corner_block_style": "outer-square-drop-out",
"background_color": "255,255,255,1",
"foreground_color": "0,0,0,1",
"outer_corner_color": "0,0,0,1",
"inner_corner_color": "0,0,0,1",
"options": null,
"logo_file_id": null,
"logo_size": null,
"frame": null,
"freme_options": {},
"qr_design_template_id": null,
"index": 1,
"view": 0,
}
}

Update QR Code

Update an existing QR code.

PATCH https://v1.freeqr.io/api/qr_codes/{id}

Requires Authentication: Yes

Path Parameters

ParameterTypeRequiredDescription
idstring (ULID)YesQR code ID

Request Body

Same parameters as Create QR Code, but all fields are optional.

Note: When qr_design_template_id is provided, the template's current version config is merged with the provided design fields, where provided values override template config values. This allows you to use template defaults while customizing specific fields.

Response

{
"data": {
"id": "01arz3ndektsv4rrffq69g5fav",
"title": "My QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 640,
"margin": 4,
"error_correction": 1,
"text": "https://example.com/page",
"default_block_style": "heart",
"inner_corner_block_style": "inner-heart",
"outer_corner_block_style": "outer-square-drop-out",
"background_color": "255,255,255,1",
"foreground_color": "0,0,0,1",
"outer_corner_color": "0,0,0,1",
"inner_corner_color": "0,0,0,1",
"options": null,
"logo_file_id": null,
"logo_size": null,
"frame": null,
"freme_options": {},
"qr_design_template_id": null,
"index": 1,
"view": 0,
}
}

Delete QR Code

Delete a QR code.

DELETE https://v1.freeqr.io/api/qr_codes/{id}

Requires Authentication: Yes

Path Parameters

ParameterTypeRequiredDescription
idstring (ULID)YesQR code ID

Response

Returns the deleted QR code resource (same structure as Get QR Code).