Docs menu

QR codes API

Make, list, change and delete QR codes for links, contact cards, Wi-Fi and more, and read their scans, with the siz.la REST API.

A QR code holds a web address, a contact card, a Wi-Fi login or another kind of content. Reading needs a key. Making, changing and deleting codes need a key with write access, like the link calls.

Some types are dynamic. A dynamic code holds a short link, so you can change where it leads after it is printed, and every scan is counted. Static codes hold their content directly, so they cannot change and cannot be counted. Your plan sets how many codes you can make a month.

The members area has a designer for shapes, frames and gradients. Through the API you set the colors and a logo, and a code made in the designer keeps its look when you change its content.

List QR codes

GET/api/qr

Your QR codes, newest first, with how many times each was scanned.

Needs: API key.

Parameters

NameInTypeDescription
limitQueryintegerHow many codes to return on a page. 1 to 100. Default 15.
pageQueryintegerWhich page to return. At least 1. Default 1.

Example request

Shell
curl "https://siz.la/api/qr?limit=10&page=1" \
  -H "Authorization: Bearer $SIZLA_API_KEY"
JavaScript
const response = await fetch("https://siz.la/api/qr?limit=10&page=1", {
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
  },
});
const data = await response.json();
console.log(data);
Python
import os
import requests

response = requests.get(
    "https://siz.la/api/qr",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
    params={
        "limit": 10,
        "page": 1,
    },
)
print(response.json())
PHP
$ch = curl_init('https://siz.la/api/qr?limit=10&page=1');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

Example answer, status 200

JSON
{
    "error": "0",
    "data": {
        "result": 1,
        "perpage": 10,
        "currentpage": 1,
        "nextpage": null,
        "maxpage": 1,
        "qrs": [
            {
                "id": 77,
                "link": "https://siz.la/menu-qr",
                "scans": 58,
                "name": "Table cards",
                "date": "2026-11-13 12:00:00",
                "type": "link"
            }
        ]
    }
}

Notes

  • link is the short address a dynamic code points through. It is an empty string for a static code, which holds its content directly, and scans is null for it because a static code cannot be counted.
  • error is the text "0" on this endpoint and the number 0 on the others.

Get a QR code

GET/api/qr/{id}

One QR code with its content and colors, and a summary of the visits through its link.

Needs: API key.

Parameters

NameInTypeDescription
id (required)PathintegerThe code's id. At least 1.

Example request

Shell
curl "https://siz.la/api/qr/77" \
  -H "Authorization: Bearer $SIZLA_API_KEY"
JavaScript
const response = await fetch("https://siz.la/api/qr/77", {
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
  },
});
const data = await response.json();
console.log(data);
Python
import os
import requests

response = requests.get(
    "https://siz.la/api/qr/77",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
)
print(response.json())
PHP
$ch = curl_init('https://siz.la/api/qr/77');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

Example answer, status 200

JSON
{
    "error": 0,
    "details": {
        "id": 77,
        "link": "https://siz.la/menu-qr",
        "scans": 58,
        "name": "Table cards",
        "date": "2026-11-13 12:00:00",
        "type": "link",
        "foreground": "#17171a",
        "background": "#ffffff",
        "fields": {
            "url": "https://example.com/menu"
        }
    },
    "data": {
        "clicks": 58,
        "uniqueClicks": 49,
        "topCountries": {
            "US": 31,
            "GB": 12
        },
        "topReferrers": 0,
        "topBrowsers": {
            "Safari": 40
        },
        "topOs": {
            "iOS": 38
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 4
        }
    }
}

Errors specific to this call

  • 404: The code does not exist or belongs to someone else.

Notes

  • A list in data is the number 0 when there is nothing to count. A static code has no link behind it, so all of data is 0.

Make a QR code

POST/api/qr/add

Make a QR code. Dynamic types make a short link behind the code, so the destination can change later and scans are counted. Your plan's monthly QR code limit applies.

Needs: API key with write access.

Parameters

NameInTypeDescription
data (required)BodystringWhat the code holds. Send text to fill the main field of the type, such as the web address for link, or an object with the type's own fields.
typeBodystringWhat the code does when scanned. It cannot be changed afterwards. One of text, sms, wifi, vcard, event, link, email, phone, whatsapp, app, crypto. Default link.
nameBodystringA name for you. It defaults to the start of the content. Up to 120 characters.
foregroundBodystringThe color of the code, such as #17171a. It must contrast enough with the background for a phone to read it.
backgroundBodystringThe background color, such as #ffffff.
logoBodystringA PNG, JPG or WebP picture of up to 500 KB, sent as base64 text or a data address, drawn in the middle of the code. Send an empty string to remove it.

Example request

Shell
curl -X POST "https://siz.la/api/qr/add" \
  -H "Authorization: Bearer $SIZLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"link","data":"https://example.com/menu","name":"Table cards","foreground":"#17171a"}'
JavaScript
const response = await fetch("https://siz.la/api/qr/add", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "link",
    "data": "https://example.com/menu",
    "name": "Table cards",
    "foreground": "#17171a"
  }),
});
const data = await response.json();
console.log(data);
Python
import os
import requests

response = requests.post(
    "https://siz.la/api/qr/add",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
    json={
        "type": "link",
        "data": "https://example.com/menu",
        "name": "Table cards",
        "foreground": "#17171a",
    },
)
print(response.json())
PHP
$ch = curl_init('https://siz.la/api/qr/add');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'type' => 'link',
        'data' => 'https://example.com/menu',
        'name' => 'Table cards',
        'foreground' => '#17171a',
    ]),
]);
$data = json_decode(curl_exec($ch), true);

Example answer, status 200

JSON
{
    "error": 0,
    "id": 77,
    "link": "https://siz.la/menu-qr"
}

Errors specific to this call

  • 400: The type or content is not valid, the colors are too close for a phone to read, the content is too long for one code, or the monthly limit is used up. message says which.

Notes

  • Types and their fields: text takes text (the main one); sms takes phone (the main one), message; wifi takes ssid (the main one), security, password, hidden; vcard takes first_name (the main one), last_name, organization, job_title, phone, email, website, address; event takes title (the main one), starts_at, ends_at, location, description; link takes url (the main one); email takes to (the main one), subject, body; phone takes phone (the main one); whatsapp takes phone (the main one), message; app takes ios (the main one), android, fallback; crypto takes coin, address (the main one), amount.
  • The answer's link is an empty string for a static code.

Update a QR code

PUT/api/qr/{id}/update

Change a QR code. Only the fields you send change. The type of a code cannot change. A dynamic code keeps its printed picture and sends scans to the new destination.

Needs: API key with write access.

Parameters

NameInTypeDescription
id (required)PathintegerThe code's id. At least 1.
dataBodystringThe new content: text for the main field of the type, or an object with the fields to change.
nameBodystringA name for you. It defaults to the start of the content. Up to 120 characters.
foregroundBodystringThe color of the code, such as #17171a. It must contrast enough with the background for a phone to read it.
backgroundBodystringThe background color, such as #ffffff.
logoBodystringA PNG, JPG or WebP picture of up to 500 KB, sent as base64 text or a data address, drawn in the middle of the code. Send an empty string to remove it.

Example request

Shell
curl -X PUT "https://siz.la/api/qr/77/update" \
  -H "Authorization: Bearer $SIZLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":"https://example.com/new-menu"}'
JavaScript
const response = await fetch("https://siz.la/api/qr/77/update", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "data": "https://example.com/new-menu"
  }),
});
const data = await response.json();
console.log(data);
Python
import os
import requests

response = requests.put(
    "https://siz.la/api/qr/77/update",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
    json={
        "data": "https://example.com/new-menu",
    },
)
print(response.json())
PHP
$ch = curl_init('https://siz.la/api/qr/77/update');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'data' => 'https://example.com/new-menu',
    ]),
]);
$data = json_decode(curl_exec($ch), true);

Example answer, status 200

JSON
{
    "error": 0,
    "message": "QR code has been updated successfully"
}

Errors specific to this call

  • 400: A value is not valid. message says which.
  • 404: The code does not exist or belongs to someone else.

Delete a QR code

DELETE/api/qr/{id}/delete

Delete a QR code. The short link made for a dynamic code goes with it, and printed copies stop working.

Needs: API key with write access.

Parameters

NameInTypeDescription
id (required)PathintegerThe code's id. At least 1.

Example request

Shell
curl -X DELETE "https://siz.la/api/qr/77/delete" \
  -H "Authorization: Bearer $SIZLA_API_KEY"
JavaScript
const response = await fetch("https://siz.la/api/qr/77/delete", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
  },
});
const data = await response.json();
console.log(data);
Python
import os
import requests

response = requests.delete(
    "https://siz.la/api/qr/77/delete",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
)
print(response.json())
PHP
$ch = curl_init('https://siz.la/api/qr/77/delete');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);

Example answer, status 200

JSON
{
    "error": 0,
    "message": "QR code has been deleted successfully"
}

Errors specific to this call

  • 404: The code does not exist or belongs to someone else.