eSMS AfricaeSMS Africa
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/qr

Request body

{
  "link_id": "0f5c84e2-7a1e-43d2-8aa1-c0ce93114605",
  "url": null,
  "label": "Poster QR",
  "fg_color": "#1F1B17",
  "bg_color": "#FFFFFF"
}
FieldTypeRequiredDescription
link_idstringOne of link_id/urlEncode one of your existing short links
urlstringOne of link_id/urlEncode an arbitrary URL (screened)
labelstringNoName for your dashboard
fg_colorstringNoForeground hex, default #1F1B17
bg_colorstringNoBackground 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

StatusDescription
402Paid plan required, or monthly QR limit reached
403QR codes not available on your plan, or missing links:write scope
422Neither link_id nor url provided, or the URL failed screening

List QR codes

GET https://links.esmsafrica.io/v1/qr

Query: 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}.png

Returns 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" }'

On this page