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": 300,
"margin": 4,
"error_correction": "M",
"text": "https://example.com/page",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
],
"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": 300,
"margin": 4,
"error_correction": "M",
"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": 60,
"frame": "none",
"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
marginintegerNoMargin size. Overrides template config value when qr_design_template_id is set.
error_correctionstringNoError correction level (L, M, Q, H). 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 percentage. Overrides template config value when qr_design_template_id is set.
framestringNoFrame type. 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.

Response

{
"data": {
"id": "01arz3ndektsv4rrffq69g5fav",
"title": "My QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 300,
"margin": 4,
"error_correction": "M",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
}

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": 300,
"margin": 4,
"error_correction": "M",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
}

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": "Updated QR Code",
"resource_type": "page",
"resource_id": "01arz3ndektsv4rrffq69g5fav",
"size": 400,
"margin": 4,
"error_correction": "H",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
}

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