paintqr

PaintQR API

Make picture QR codes from your own software. Send the content and the picture; get back a code that was checked with a scanner, as PNG, SVG or PDF.

Beta. Fields listed here are not removed or changed; new ones may be added, so ignore a field you do not know. The wording of messages may change.

Start

  1. Sign in and create a key in the API tab of your dashboard. It is shown once: keep it in your server's secrets.
  2. Send the key with every request as Authorization: Bearer pqr_.... Every address on this page begins with https://paintqr.com.
  3. Put the key in the environment variable PAINTQR_KEY (export PAINTQR_KEY=pqr_...) and make a code:
curl --fail https://paintqr.com/v1/codes \
  -H "Authorization: Bearer $PAINTQR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: image/png" \
  -d '{"content": {"type": "link", "url": "https://example.com/menu"},
       "picture": {"text": "MENU"}}' \
  -o menu.png

The answer is the PNG file. --fail makes curl stop with the status number when the answer is an error, so an error is never saved as menu.png; the reasons for each status are under Errors.

Asked for this way, with the Accept header, the file comes with the code's id, its scan verdict and the month's count in the headers, and nothing else. Leave the header out and the answer is JSON, which adds the smallest print size, the reasons for the verdict and a suggested fix (see The answer); the file is then fetched from image_url.

Plans

Codes a monthFilesBest quality, editable linksLinks heldRequests a minute
No plan25A small PNG for testingNoNone10
Pro, US$8 a month500PNG up to 3200 px, SVG, PDFYes50030
API, US$29 a month5,000PNG up to 3200 px, SVG, PDFYes5,00060
  • Without a plan the image is a small PNG for testing your integration: four pixels a square whatever size is asked for, which is 340 pixels a side for a code of 77 squares. It scans from a screen and is not for print.
  • Pro is the website's subscription. The API plan includes everything in Pro and is started in the API tab of your dashboard. Best quality and editable links are the fields quality and editable under Make a code.
  • A code counts once, when it is made. Sending the same request again, or fetching its image again, is not counted, so a retry never costs twice. The same request means the same fields with the same values and the same picture file.
  • An identical editable request also returns the same code and the same short address: forty identical requests make one link. For forty links, make the requests differ, for example in the destination (https://example.com/menu?table=7).
  • The count starts again on the 1st of each month (UTC).
  • Reading a link's statistics and changing a link by API come with Pro and with the API plan.
  • "Links held" is how many editable codes and short links an account can have at one time. When it is full, a request for one more editable code is refused (error 409); removing a link on the dashboard frees its place.
  • For more than 5,000 codes a month, write to us.

Make a code

POST /v1/codes with a JSON body and the header Content-Type: application/json. The answer has status 201, also when the same request is sent again. Most codes take under a second; allow 60 seconds for the largest sizes and for best quality.

FieldValueMeaning
contentobject, requiredWhat the code carries: one of the four kinds under Content.
pictureobject, requiredWhat the squares draw. It holds exactly one of text, icon, image or plain: two of them, or none, is refused (400).
picture.textup to 12 lettersLetters as the picture, on one line or two. A line break (\n inside the JSON string) starts the second line and is not counted.
picture.iconan icon's idAn icon as the picture, for example phosphor:coffee. See Icons.
picture.imagebase64 text, up to 2 MB of itYour own picture: a PNG, JPEG, WebP or SVG file in base64. 2 MB of base64 is a file of about 1.5 MB.
picture.plaintrueA standard code without a picture.
picture.zoomnumber, 0.4 to 1.6; default 1.0Size of the picture, icon or letters inside the code. 1.0 fits the square between the code's three corner markers, at every detail; about 1.25 fills the code's width.
picture.fitpad, crop or stretch; default padHow a picture that is not square is fitted: pad keeps the whole picture and adds a margin, crop cuts it to a square, stretch pulls it to a square.
picture.backgroundkeep, fade or white; default keepWhat happens to the background of a photo: keep draws it, fade lets it fade, white cuts the subject out on white. The cutout style uses white unless this field is sent.
picture.solidtrue or false; default trueKeeps the shapes of a logo, an icon or letters exact; the code's texture stays outside them. On unless you send false, as in the maker (until 24 November 2026 a request left it off).
picture.insidetrue or false; default falseKeeps the picture or letters inside the square between the code's three corner markers. It is drawn smaller when needed; a zoom that is already small enough is kept. The frame around it is kept clear, and the code has at least the squares of detail high, so it prints larger.
style.presetclassic, colour, accent, cutout, halftone or poster; default colourThe style. classic is black and white, colour uses the picture's own colours, accent draws the picture in one colour, cutout removes a photo's background first, halftone renders a photo's tones as patterns of squares, poster reduces a photo to six flat colours and needs a larger print.
style.accent#rrggbb; default #0b2f6bThe dark colour of the accent style. It is darkened when it is too light to scan.
style.light#rrggbb; default #ffffffThe light colour.
style.palettelist of up to five #rrggbbBrand colours to draw the picture in. Used by the colour, cutout and halftone styles, and by poster for an icon; classic, accent, letters and a photo in the poster style ignore it.
detailauto, low, medium, high or max; default autoHow many squares the code has. More squares draw a finer picture and need a larger print; auto chooses for you. Content that does not fit the level asked for raises it, and the answer names the level used in detail_raised.
balancesafe, balanced or picture; default balancedThe trade between a cleaner picture (picture) and a wider scanning margin (safe).
qualitystandard or best; default standardbest gives a cleaner picture and takes several seconds longer. Needs a plan.
editabletrue, false or {"code": "SX8VNE"}; default falseOnly with content of the kind link. With true the code carries a new short address that forwards to content.url, and you can change where it leads later, on your dashboard or with PATCH /v1/links/{code}. With {"code": ...} the design is drawn onto a link you already have: use it to change a code's picture. The link keeps its short address, its statistics and its place among your links; no second link is made. If content.url differs from where the link leads, the link is sent there. The link's earlier designs stay yours and can still be fetched. A code that is not one of your links is refused (404). Needs a plan.

A field this table does not list is refused (422, or 400 inside content), so a misspelt name is never silently ignored.

Content

content is one of four kinds:

{"type": "link",  "url": "https://example.com/menu"}
{"type": "text",  "text": "Table 7"}
{"type": "wifi",  "wifi": {"ssid": "Cafe Guest", "password": "flatwhite", "auth": "WPA"}}
{"type": "vcard", "vcard": {"fn": "Ada Lovelace", "tel": "+61 400 000 000",
                            "email": "[email protected]", "org": "Analytical Engines",
                            "title": "Engineer", "url": "https://example.com"}}
typeFieldsLimits and values
linkurlBegins with http:// or https:// and has at most 200 characters, also when the code is editable.
texttextAbout 1,500 bytes at most in a code without a picture; a code with a picture holds less, and the refusal says so.
wifiwifi, an object with ssid, password, auth and hiddenssid has at most 32 characters and password at most 63. auth is WPA (the default), WEP or nopass, which needs no password. "hidden": true is for a hidden network.
vcardvcard, an object with fn, tel, email, org, title and urlOnly fn, the full name, is required. The whole contact has at most 1,500 bytes.

Long content needs more squares (see detail), and a code with a picture holds less than these limits: content that leaves no room for the picture at any level is refused (400).

Icons

GET /v1/icons lists the icons that picture.icon takes. It needs no key.

ParameterValueMeaning
qone or more wordsSearches the icons, for example ?q=coffee. Every word must match.
categorya name from categories in the answerOnly the icons of that category.
setthe part of an id before the colonOnly the icons of that set.
limit1 to 200; default 60How many icons come back. A number above 200 is cut to 200.
  • The answer holds icons, categories, found and total. Each icon has id (what picture.icon takes), name, set, category and thumb, the address of a small PNG of it, to be added to https://paintqr.com.
  • found is how many icons match the search and total how many the library holds. There is no next page: when found is larger than the number that came back, narrow the search.
  • A category or set that does not exist returns an empty list, not an error.

The file in the same call

To get the file in the same call, add ?format=png (or svg, pdf) to the address, and for a PNG &size=1200; or send the header Accept: image/png, image/svg+xml or application/pdf. This call takes format and size only: to ask by the printed width, fetch the image afterwards (see Fetch the image). SVG and PDF need a plan; without one the request is refused (402) before the code is made, and nothing is counted.

The file then comes with headers in place of the JSON: X-PaintQR-Id (the id), X-PaintQR-Scan (the verdict), X-PaintQR-Used and X-PaintQR-Limit (the month's count and its limit) and, for an editable code, X-PaintQR-Short-Url. The smallest print size, the reasons and the suggested fix are in the JSON only: GET /v1/codes/{id}.

The answer

The JSON answer to the request under Start, sent without the Accept header:

{
  "id": "858c9b7ea563f57354cdfc94",
  "scan": { "verdict": "ok", "reasons": [], "suggest": null },
  "squares": 77,
  "detail_raised": null,
  "min_print_cm": 5.5,
  "min_square_mm": 0.65,
  "encoded": "https://example.com/menu#309288337341106...",
  "notes": [],
  "short_url": null,
  "image_url": "https://paintqr.com/v1/codes/858c9b7ea563f57354cdfc94/image",
  "usage": { "plan": "free", "month": "2026-11", "used": 1, "limit": 25 }
}
  • id names the code: GET /v1/codes/{id} returns this JSON again. Sending the same request again returns the same id.
  • scan.verdict is ok, fragile or fail. fragile: the code can be read, but with little margin. fail: it cannot be read at all. Only POST /v1/check ever answers fail; POST /v1/codes refuses such a design (error 422) and counts nothing.
  • scan.reasons says why the verdict is not ok, in short sentences for a person, and is empty when it is. Do not match on the wording, which may change.
  • scan.suggest is null, or the fields of the request to change, for example {"detail": "medium"} or {"balance": "balanced"}. It can come with fragile and with fail. It is a suggestion, not a guarantee: apply it and check again.
  • For a fragile code, in this order: apply scan.suggest if there is one, with POST /v1/check before the code is made, since a changed request is a new code and is counted. Otherwise choose "balance": "safe", or keep the code, print it well above min_print_cm and test a print: a fragile code has less to spare than that figure assumes.
  • squares is the number of squares along one side, without the white margin of four squares on each side: the image is squares + 8 squares wide.
  • detail_raised is null when the level of detail asked for was used. When the content needed more squares it names the level used: medium, high or max.
  • min_print_cm is the smallest width, in centimetres, at which phones read the printed code reliably when the verdict is ok. It is a whole or half centimetre and measures the whole image, white margin included. Do not print the code smaller, and do not trim the margin.
  • min_square_mm is the printed width of one square, in millimetres, when the image is printed at min_print_cm. Compare it with what your printer holds cleanly: smaller squares are harder for a phone to read.
  • encoded is the exact text the code carries, as a scanner reads it (cut short in the sample above). For a link it is your address, then # and a long run of digits. The digits draw the picture; they are not sent to your server, though a script on your page can see them. A link with a part after # of its own keeps that part: the digits come before it, as ?_= or &_= and the digits. An editable code carries its short address in capitals, then / and the digits. It is null for a code made before 24 November 2026.
  • notes is a list, usually empty, of things to know about this code. Each note has a code, which does not change, and a message for a person, which may. digits_in_query: the address has a part after # of its own, which is kept as written, so the digits are carried in front of it, in a query parameter named _ that your server receives; if your addresses are signed or must not change, an editable code leaves the address as it is. long_address: the address is long and takes room from the picture; an editable code would draw a cleaner one.
  • short_url is null unless the code is editable. It is then the address the code opens: live as soon as the code is made, and listed in the Codes tab of your dashboard.
  • image_url is where the file is fetched (see Fetch the image). It needs your key, so it is not an address to put in a web page.
  • usage is what GET /v1/usage returns, after this code.

Check a design without making it

POST /v1/check takes the same JSON body as POST /v1/codes, with the same Authorization header, and says whether the design would scan and how small it can print, without making the code. Nothing is counted against the month, and no image, id or short address comes back. Use it to compare designs and settle on one before a code is made.

This design comes back fragile, with a change to try:

curl https://paintqr.com/v1/check \
  -H "Authorization: Bearer $PAINTQR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": {"type": "link", "url": "https://example.com/menu"},
       "picture": {"icon": "phosphor:coffee"},
       "style": {"preset": "accent", "accent": "#663418"},
       "detail": "high", "balance": "picture"}'
{
  "scan": {
    "verdict": "fragile",
    "reasons": ["a dark, coloured icon at this level of detail",
                "a strong accent colour with a large picture"],
    "suggest": { "detail": "medium" }
  },
  "squares": 77,
  "detail_raised": null,
  "min_print_cm": 5.5,
  "min_square_mm": 0.65,
  "notes": [],
  "counted": false,
  "usage": { "plan": "free", "month": "2026-11", "used": 1, "limit": 25 }
}
  • scan, squares, detail_raised, min_print_cm, min_square_mm and notes are what POST /v1/codes would answer for the same body, and mean what they mean under The answer.
  • scan.verdict is ok, fragile or fail. With fail the design cannot be read: the check still answers 200, and POST /v1/codes would refuse the same body with 422.
  • scan.suggest is null, or the fields to change. Copy them into the body and check again: a suggestion is not a guarantee.
  • counted is always false: a check counts no code.
  • usage is what GET /v1/usage returns, unchanged by the check.

The answer has status 200. A check takes as long as making the code, so allow the same 60 seconds, and it is one request against your plan's requests a minute: checks and codes share one allowance. The address takes no parameters.

"quality": "best" and "editable": true need a plan here as they do when a code is made. An editable code carries its short address in place of your link, so an editable design is checked with a stand-in address of the same length: the verdict holds and no address is taken.

A check says whether the design scans. It does not look at whether the month has codes left, whether the account has room for another link, or whether the destination is allowed: those are answered when the code is made.

Fetch the image

GET /v1/codes/{id}/image returns the file; image_url in the answer is this address. It needs the Authorization header. GET /v1/codes/{id} returns the JSON again.

ParameterValueMeaning
formatpng, svg or pdf; default pngThe kind of file. SVG and PDF need a plan (402 without one).
size100 to 3200; default 1024For a PNG: its width in pixels.
size_cmabove 1 and below 100The printed width in centimetres, white margin included. For a PNG: enough pixels for a print of that width. For a PDF: the size of the page.
dpi72 to 1200; default 300For a PNG asked for with size_cm: the printer's dots per inch.
  • These parameters belong to this address. POST /v1/codes takes format and size only.
  • A PNG has a whole number of pixels for each square, at least 4 and at most 64, so it is seldom exactly size wide: a little narrower as a rule, and wider when size is small. A code of 77 squares asked for with size=100 comes back 340 pixels wide. With size_cm the number is rounded up, so a print is never short of pixels.
  • For example GET /v1/codes/{id}/image?size_cm=8&dpi=600 is a PNG for an 8 cm print on a 600 dpi printer, and ?format=pdf&size_cm=8 a PDF page 8 cm wide.
  • A PNG has at most 3200 pixels a side, which is about 27 cm at 300 dpi. A size_cm that needs more is refused (400): ask for SVG or PDF, which have no such limit.
  • For a PNG, size and size_cm together are refused (400).
  • A size_cm below the code's min_print_cm is refused (422) in every format, SVG included, with the minimum in the message.
  • Otherwise an SVG ignores every size, since it scales to any width. A PDF takes size_cm only, and without it has a page of min_print_cm. dpi matters only with size_cm for a PNG.
  • Without a plan the image is the small PNG for testing, whatever size, size_cm or dpi asks for.

Save the file and serve it from your side. Files are kept here for 30 days from when the code was last made: sending the same request to POST /v1/codes again renews the 30 days and is not counted, and fetching the image or the JSON does not renew them. The printed code itself works for good, because the content is in its squares. An editable code's files are kept for as long as its link exists.

Examples

Each example reads the key from the environment variable PAINTQR_KEY and runs on a key without a plan.

Python, with your logo

import base64, os, requests

AUTH = {"Authorization": "Bearer " + os.environ["PAINTQR_KEY"]}

logo = base64.b64encode(open("logo.png", "rb").read()).decode()
r = requests.post(
    "https://paintqr.com/v1/codes",
    headers=AUTH,
    json={
        "content": {"type": "link", "url": "https://example.com/menu"},
        "picture": {"image": logo},
        "style": {"preset": "colour"},
    },
    timeout=60,
)
if not r.ok:
    raise SystemExit(f"{r.status_code}: {r.json()['detail']}")
code = r.json()
print(code["id"], code["scan"]["verdict"], code["min_print_cm"])

png = requests.get(code["image_url"], params={"format": "png", "size": 1200},
                   headers=AUTH, timeout=60)
png.raise_for_status()
open("menu.png", "wb").write(png.content)

Without a plan size changes nothing and menu.png is the small PNG for testing.

Python: check, apply the suggestion, then make the code

import os, requests

AUTH = {"Authorization": "Bearer " + os.environ["PAINTQR_KEY"]}

def post(path, body):
    r = requests.post("https://paintqr.com/v1" + path, headers=AUTH, json=body, timeout=60)
    if not r.ok:
        raise SystemExit(f"{r.status_code}: {r.json()['detail']}")
    return r.json()

body = {
    "content": {"type": "link", "url": "https://example.com/menu"},
    "picture": {"icon": "phosphor:coffee"},
    "style": {"preset": "accent", "accent": "#663418"},
    "detail": "high",
    "balance": "picture",
}
scan = post("/check", body)["scan"]
for _ in range(3):
    if scan["verdict"] == "ok" or not scan["suggest"]:
        break
    body.update(scan["suggest"])
    scan = post("/check", body)["scan"]
if scan["verdict"] == "fail":
    raise SystemExit("; ".join(scan["reasons"]))

code = post("/codes", body)
print(body["detail"], code["scan"]["verdict"], code["min_print_cm"], code["image_url"])

The first check answers fragile with {"detail": "medium"}, and the second, with that change, ok. The loop stops after three suggestions, and a design that still cannot be read is not sent to POST /v1/codes.

JavaScript (Node 18 or later, saved as example.mjs), with an icon

import { writeFile } from "node:fs/promises";

const auth = { Authorization: `Bearer ${process.env.PAINTQR_KEY}` };

const r = await fetch("https://paintqr.com/v1/codes", {
  method: "POST",
  headers: { ...auth, "Content-Type": "application/json" },
  body: JSON.stringify({
    content: { type: "link", url: "https://example.com/menu" },
    picture: { icon: "phosphor:coffee" },
    style: { preset: "accent", accent: "#663418" },
  }),
});
if (!r.ok) throw new Error((await r.json()).detail);
const code = await r.json();
console.log(code.id, code.scan.verdict, code.min_print_cm);

const png = await fetch(`${code.image_url}?format=png`, { headers: auth });
if (!png.ok) throw new Error((await png.json()).detail);
await writeFile("menu.png", Buffer.from(await png.arrayBuffer()));

await outside a function needs a module, which the name example.mjs gives. Asking for format=svg or format=pdf in the second request needs a plan.

Open the maker with a design

If you designed a code in the maker first, this is where each of its settings goes in a request:

In the makerIn a request
Editable latereditable
Standard QRpicture.plain
Picture size, Letter sizepicture.zoom
Detaildetail
Keep the logo or face exactpicture.solid
Keep it inside the corner squarespicture.inside
Classic, Accent, Colour, Cut-out, Halftone, Posterstyle.preset
Accent colourstyle.accent
Picture or safetybalance
Qualityquality
Fitpicture.fit
Backgroundpicture.background

The maker is the page at https://paintqr.com/make/ where a person designs a code. An address that opens it can carry a design: the page opens with that design drawn, for a person to look at, change and download. The preview is free there; the print files are bought there or come with that person's plan. It needs no key, so a program or an assistant can prepare a design and hand over the address.

ParameterValueWhat it sets
urla web addressWhat the code opens.
typevcard, text or wifiAnother kind of content; a link is the default. With vcard send fn, tel, email, org and site, the contact's web address. With text send text. With wifi nothing more can be sent: the Wi-Fi form opens empty and the person types the network name and the password, which does not belong in an address.
lettersup to 12 lettersLetters as the picture.
iconan icon's idAn icon as the picture. See Icons.
pictureplain or uploadplain makes a standard code without a picture. upload opens the page asking for the person's own picture.
presetclassic, colour, accent, cutout, halftone or posterThe style.
accenta colour as %23rrggbbThe dark colour of the accent style.
detailauto, low, medium, high or maxHow many squares the code has.
balancesafe, balanced or pictureThe trade between a cleaner picture and a wider scanning margin.
solid1 or 0Keeps a logo's shapes exactly as drawn.
inside1 or 0Keeps the picture inside the square between the three corner markers.
fitcrop or padHow a picture that is not square is fitted.
zooma number from 0.4 to 1.6The size of the picture inside the code.
editablelaterTicks the box for an editable link, which needs a plan.
  • For example https://paintqr.com/make/?url=https%3A%2F%2Fexample.com%2Fmenu&icon=phosphor:coffee&zoom=1&solid=0&preset=accent&detail=medium. Values are URL-encoded.
  • The names are the address's own. These differ from a request's: letters stands for picture.text; plain and upload are values of picture; editable takes later where a request takes true; solid takes 1 or 0; and a contact's web address is site.
  • A name or a value the maker does not know is ignored without a message, where the API would refuse it. Open the address once and look.
  • The page opens with the maker's own defaults, which are also a request's. To hand over exactly the design that was checked, send every setting explicitly.
  • A picture file cannot travel in an address: send picture=upload and the person adds it. The light colour, the palette, the background setting, the stretch fit and best quality have no parameter either.

Editable links and their statistics

An editable code, or a short link made on your dashboard, is a link: it has a short address, a destination you can change, and a record of its scans. With Pro or the API plan you can read that record and change the link from your own software. Reading does not count against the month's codes. In the addresses below, {code} is the last part of the link's short address (MENU in https://paintqr.com/MENU). It is the code field of every link, and not the id of a code.

RequestWhat it does
GET /v1/linksYour links, as {"links": [...]}. Add ?label=Sydney for one label's links.
GET /v1/links/{code}One link, with its campaign.
GET /v1/links/{code}/statsThat link's statistics over a period.
GET /v1/statsThe same across all your links, or with ?label= across one label's. It adds links, how many links were counted, and by_link, the scans of each.
PATCH /v1/links/{code}Change where a link leads, pause or resume it, rename it, set its labels or its campaign tags.

A link

{
  "code": "MENU",
  "short_url": "https://paintqr.com/MENU",
  "name": "Winter menu",
  "destination": "https://example.com/winter-menu",
  "active": true,
  "labels": ["Menus", "Sydney"],
  "kind": "code",
  "created": "2026-10-28T02:14:07Z",
  "scans_7d": 268,
  "scans_30d": 1175,
  "last_scan": "2026-11-30T09:41:12Z",
  "campaign": { "on": true, "source": "flyer", "medium": "", "campaign": "q4" }
}
  • code and short_url are the link's code and its short address.
  • name is your own name for the link, or null. labels are your own words for grouping links.
  • destination is where the link leads. active is false while the link is paused.
  • kind is code for an editable code and link for a short link made on the dashboard.
  • created and last_scan are times in UTC, written as in the sample. last_scan is the latest scan of the last 30 days, and null when there was none in that time.
  • scans_7d and scans_30d count the scans of the last 7 and 30 days.
  • campaign comes with one link, not with the list: the campaign tags the link adds to its destination when it forwards.

Statistics over a period

Statistics cover the last 30 days unless you say otherwise: ?days=7 (1 to 365), or two dates, both included, as ?from=2026-11-01&to=2026-11-30. to may be left out and is then today; to without from is refused (400). When dates are sent, days is not used. Dates and days are in UTC. Scans are kept for 400 days, and one period covers at most that.

curl "https://paintqr.com/v1/links/MENU/stats?from=2026-11-01&to=2026-11-30" \
  -H "Authorization: Bearer $PAINTQR_KEY"
{
  "code": "MENU",
  "from": "2026-11-01", "to": "2026-11-30",
  "scans": 1175, "unique": 975, "previous_scans": 1049,
  "by_day":      [{ "day": "2026-11-01", "scans": 34, "unique": 29 }],
  "by_country":  [{ "country": "AU", "scans": 717 }],
  "by_city":     [{ "city": "Sydney", "region": "NSW", "country": "AU", "scans": 447 }],
  "by_system":   [{ "system": "ios", "scans": 682 }],
  "by_language": [{ "language": "en", "scans": 917 }],
  "by_app":      [{ "app": "safari", "scans": 611 }],
  "by_referrer": [{ "site": "instagram.com", "scans": 59 }],
  "by_hour":     [{ "weekday": 4, "hour": 19, "scans": 80 }],
  "by_source":   { "scanned": 1034, "clicked": 141 }
}
  • unique counts distinct visitors per day. It cannot follow a visitor from one day to the next, by design, so over a month the same person on two days counts twice.
  • previous_scans is the count for the period of the same length just before, so that a change such as "up 12%" can be shown.
  • by_hour is in the time zone of the place each visitor's network is in. weekday runs from 0 (Monday) to 6 (Sunday).
  • by_source separates scans of the printed code from the short address opened as a link.
  • by_country and by_city hold the 60 largest entries, and by_language, by_app and by_referrer the 30 largest.
  • City, system, language, app, referring site and hour are recorded for scans from 19 November 2026; earlier scans appear in the totals, the days and the countries only.
  • Figures are refreshed once a minute.

As a CSV file

Add format=csv for a file a spreadsheet opens directly: /v1/links?format=csv gives one row per link (short_url, name, destination, active, labels, kind, created, scans_7d, scans_30d, last_scan); /v1/links/{code}/stats?format=csv gives a row per day (day, scans, unique); /v1/stats?format=csv gives a row per link per day (link, name, day, scans). The same exports are on the dashboard, under Overview and Codes.

Changing a link

Send PATCH /v1/links/{code} with a JSON body that holds any of these fields. A body with none of them is refused (400).

FieldValueMeaning
destinationa web address, 8 to 2,048 charactersWhere the link leads. An address without https://, such as example.com/menu, is completed. It is checked as a new destination is (see Rules).
activetrue or falsefalse pauses the link, true resumes it.
nametext, up to 60 charactersYour own name for the link.
labelslist of up to 8 labels, each up to 30 characters, without commasThe whole list: it replaces the labels the link has. A label that is too long or holds a comma is left out, and the answer shows the list as kept.
campaignobject{"on": true, "source": "flyer", "medium": "", "campaign": "q4"} sets the campaign tags: each has at most 80 characters; source may not be empty and, left out, is paintqr. {"on": false} removes them.
curl -X PATCH https://paintqr.com/v1/links/MENU \
  -H "Authorization: Bearer $PAINTQR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination": "https://example.com/winter-menu"}'

The answer is the link as it now stands. After a change of destination it also carries previous_destination, so a script can put it back. Sending the same change again changes nothing, so a retry is safe.

  • A printed code keeps its squares. Changing the destination changes where every printed copy leads, at once.
  • A link cannot be removed through the API, only paused. Removing is done on the dashboard. DELETE on a link answers 405 and says so.
  • A new destination, a pause or a resume, and campaign tags switched on or off are written to the link's history, which the dashboard shows. A new name or new labels are not.
  • Changes have a limit of their own, beside the requests a minute: 30 a minute on the API plan, 10 on Pro.

Usage

GET /v1/usage returns plan (free without a plan, pro or api), month (written 2026-11), used (the codes counted this month) and limit (the month's allowance). The same four come with every code and every check, under usage, and are shown on your dashboard. The call is one request against the requests a minute and counts no code.

Errors

A code that is made answers 201; every other success answers 200. An error is JSON with one field, detail: one sentence, written to be shown to a person. Its wording may change, so let a program go by the status.

StatusMeaning
400 or 422The request cannot be carried out as sent, and detail says what to change: an unknown field, a parameter the address does not take (the message lists the ones it takes), a value that cannot be used, content that is too long, a picture that cannot be read, a printed width below the code's min_print_cm, a destination that is not allowed, or a design that cannot be read (422 from POST /v1/codes). Which of the two statuses a mistake gets depends on the field, so treat them alike. Nothing is counted.
401The key is missing, misspelt or revoked.
402The plan does not include what was asked for, or this month's codes are used. GET /v1/usage tells the two apart: the month is used when used has reached limit. Nothing is counted.
404No code with this id, or no link with this code, on your account; or the code's files are no longer kept (30 days). Make the code again with the same request: it is not counted again.
409The account already holds as many links as its plan allows, so one more editable code is refused. Remove a link on the dashboard, or move to a larger plan. Nothing is counted.
413The request is larger than 3 MB.
429Too many requests in a short time. Wait for the number of seconds in the Retry-After header.
500 or 502A fault on our side; a 500 can come without JSON. Nothing is counted: send the same request again.
503The service is busy or full for a moment. Try again after the number of seconds in Retry-After.

For a retry: send the same request again after 429, 500, 502 and 503, and change it first after 400, 409 and 422.

Rules

  • Call the API from your server. A key in a web page or in an app that people download can be read by anyone; that is also why a file is served from your own copy and not from image_url.
  • Codes must lead where they say they lead. The destination of an editable code is checked against Google Safe Browsing when the code is made and whenever it is changed, and a flagged address is refused (400). The terms apply as they do on the site.
  • If a key may have leaked, revoke it in the API tab of your dashboard and make a new one; an account holds up to five.

Create a key