LinconwavesLinconwavesUnified docs
Minlink

QR Codes API

Create, style, download, and track Minlink QR codes.

  • Base URL: https://cm.minlink.io/v1/api
  • Auth: x-minlink-api-key: <your-key>
  • Responses: { status, message, data }; errors: { status: "error", error: { code, message } }

QR content types

  • url: { url } (scans redirect through /v1/qr-codes/:id/scan)
  • text: { text }
  • email: { email: { address, subject?, body? } }
  • phone: { phone }tel: link
  • sms: { sms: { number, message? } }
  • wifi: { wifi: { ssid, encryption, password?, hidden? } }
  • location: { location: { latitude, longitude, name? } }geo: URI
  • vcard: { vcard: { firstName, lastName, organization?, title?, phone?, email?, address?, website?, note? } }
  • event: { event: { title, start, end?, location?, description? } } (ICS-style payload)

Field-by-field examples (Node.js)

const BASE = 'https://cm.minlink.io/v1/api';
const headers = {
  'content-type': 'application/json',
  'x-minlink-api-key': process.env.MINLINK_API_KEY!,
};
  • url
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Marketing URL',
    type: 'url',
    content: { url: 'https://example.com' },
  }),
});
  • text
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ title: 'Plain text', type: 'text', content: { text: 'Hello world' } }),
});
  • email
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Email support',
    type: 'email',
    content: {
      email: {
        address: '[email protected]',
        subject: 'Help',
        body: 'I need assistance',
      },
    },
  }),
});
  • phone
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ title: 'Call sales', type: 'phone', content: { phone: '+15551234567' } }),
});
  • sms
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'SMS opt-in',
    type: 'sms',
    content: { sms: { number: '+15551234567', message: 'JOIN' } },
  }),
});
  • wifi
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Guest WiFi',
    type: 'wifi',
    content: {
      wifi: { ssid: 'GuestNet', encryption: 'WPA', password: 'Secret123', hidden: false },
    },
  }),
});
  • location
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Our HQ',
    type: 'location',
    content: {
      location: {
        latitude: 37.7749,
        longitude: -122.4194,
        name: 'San Francisco HQ',
      },
    },
  }),
});
  • vcard
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Contact card',
    type: 'vcard',
    content: {
      vcard: {
        firstName: 'Ada',
        lastName: 'Lovelace',
        organization: 'Example Inc',
        title: 'CTO',
        phone: '+15551234567',
        email: '[email protected]',
        address: '123 Main St, SF, CA',
        website: 'https://example.com',
        note: 'Conference 2024',
      },
    },
  }),
});
  • event
await fetch(`${BASE}/qr-codes`, {
  method: 'POST',
  headers,
  body: JSON.stringify({
    title: 'Launch event',
    type: 'event',
    content: {
      event: {
        title: 'Product Launch',
        start: '2024-09-30T18:00:00Z',
        end: '2024-09-30T19:00:00Z',
        location: '123 Demo St, SF',
        description: 'Join us for the launch.',
      },
    },
  }),
});

Styling (design)

Fields (optional): foregroundColor, backgroundColor, borderRadius, qrStyle (dots | fluid | default square), logoImage (URL), logoScale, logoPadding. Free plans cannot use custom design; paid plans required for styling.

Endpoints

Create QR

  • POST /qr-codes
  • Body: see the payload map below (JSON or multipart if uploading a logo).
PropTypeWhat it controls
titlestring (required)Friendly name shown in dashboards.
type

string (required)
url | text | email | phone | sms | wifi | location | vcard | event

Determines which content shape to send.
contentobjectPayload matching the chosen type (see examples above).
tagsstring[]Optional labels for filtering and search.
designobject

Styling (paid plans): qrStyle (dots | fluid | square),
foregroundColor, backgroundColor, borderRadius,
logoImage (URL), logoScale, logoPadding.

statusstringOptional lifecycle toggle; defaults to active.
  • Enforces plan limits and safe content checks.

List / Get / Update / Delete

  • GET /qr-codes
  • GET /qr-codes/:id
  • PUT /qr-codes/:id (any subset of title, content, status, tags, design)
  • DELETE /qr-codes/:id

Analytics

  • GET /qr-codes/:id/analytics
  • Returns (under data.analytics): totalScans, uniqueVisitorsCount, uniqueVisitors, scansData (per-day), topCountries, devices, timeOfDay, topBrowsers, topReferrers, lastUpdated, lastScanAt.

Download QR image

  • GET /qr-codes/:id/image
  • Query: format (png default, jpg, svg, pdf), size (pixels; defaults 512 or 1024 if high-res pref enabled).
  • Respects saved design (colors, style, logo).

Public scan endpoint

  • GET /qr-codes/:id/scan
  • Public: records scan analytics, then redirects/serves the encoded payload (mail/sms/wifi/etc.).
  • Optional query to enrich analytics: width, height, source; standard headers capture IP/UA/referrer.

Code samples

const BASE = 'https://cm.minlink.io/v1/api';
const API_KEY = process.env.MINLINK_API_KEY!;

async function createQr() {
  const res = await fetch(`${BASE}/qr-codes`, {
    method: 'POST',
    headers: {
      'content-type': 'application/json',
      'x-minlink-api-key': API_KEY,
    },
    body: JSON.stringify({
      title: 'Docs QR',
      type: 'url',
      content: { url: 'https://example.com/docs' },
      design: { qrStyle: 'dots', foregroundColor: '#111', backgroundColor: '#fff' },
    }),
  });
  return res.json();
}

async function downloadPng(id: string) {
  const res = await fetch(`${BASE}/qr-codes/${id}/image?format=png&size=1024`, {
    headers: { 'x-minlink-api-key': API_KEY },
  });
  return await res.arrayBuffer();
}