API ReferenceLinks API
QR Codes
Generate, list and download QR codes - /v1/qr.
Generate branded QR codes for a link or any URL. Every code counts against your monthly QR allowance. Creating and deleting require the links:write scope.
Create a QR code
POST https://links.esmsafrica.io/v1/qrRequest body
{
"link_id": "0f5c84e2-7a1e-43d2-8aa1-c0ce93114605",
"url": null,
"label": "Poster QR",
"fg_color": "#1F1B17",
"bg_color": "#FFFFFF"
}| Field | Type | Required | Description |
|---|---|---|---|
link_id | string | One of link_id/url | Encode one of your existing short links |
url | string | One of link_id/url | Encode an arbitrary URL (screened) |
label | string | No | Name for your dashboard |
fg_color | string | No | Foreground hex, default #1F1B17 |
bg_color | string | No | Background hex, default #FFFFFF |
Response - 201
{
"id": "b3f1…",
"link_id": "0f5c84e2-…",
"target_url": "https://go.esmsafrica.io/launch",
"label": "Poster QR",
"fg_color": "#1F1B17",
"bg_color": "#FFFFFF",
"png": "data:image/png;base64,iVBORw0KGgo…",
"created_at": "2026-08-03T09:00:00Z"
}The png field is a ready-to-use data URI. It is returned only on create and single-fetch.
Errors
| Status | Description |
|---|---|
402 | Paid plan required, or monthly QR limit reached |
403 | QR codes not available on your plan, or missing links:write scope |
422 | Neither link_id nor url provided, or the URL failed screening |
List QR codes
GET https://links.esmsafrica.io/v1/qrQuery: limit (max 200), offset. Returns an array of QR objects (without the png field).
Download a QR code (PNG)
GET https://links.esmsafrica.io/v1/qr/{id}.pngReturns the QR as an image/png you can embed or save directly.
Delete a QR code
DELETE https://links.esmsafrica.io/v1/qr/{id}Returns 204 No Content.
Example
curl -X POST https://links.esmsafrica.io/v1/qr \
-H "Authorization: Bearer esms_l_your_key" \
-H "Content-Type: application/json" \
-d '{ "url": "https://go.esmsafrica.io/launch", "fg_color": "#FF6A1A" }'