{
  "name": "Ensō QR Generator",
  "endpoint": "https://qr.enso.no/gen",
  "methods": {
    "POST": "Preferred. Fields in an application/x-www-form-urlencoded or flat JSON body, up to 16 KB. Nothing in the query string.",
    "GET": "Same fields as query parameters. Only for public content: the URL can end up in logs and history."
  },
  "instructions": "https://qr.enso.no/llms.txt",
  "formats": [
    "png",
    "svg",
    "txt",
    "term",
    "ascii",
    "ansi"
  ],
  "size": {
    "min": 128,
    "max": 4096,
    "default": 1024
  },
  "parameters": {
    "type": "Content type. One of: url, vcard, wifi, email, phone, sms, text, event, geo. Default url.",
    "format": "png (default), svg, txt (the raw string encoded in the code, for checking), term (the code drawn in Unicode blocks, to print in a terminal), ascii (the same with # characters), or ansi (Unicode blocks in the style colours, for terminals with 24-bit colour).",
    "style": "Preset. One of: enso, bw, hippie, night, warm, custom. Default enso.",
    "logo": "true (default) or false. The Ensō mark in the centre.",
    "size": "Width and height in pixels, 128-4096. Default 1024.",
    "margin": "Quiet zone around the code in pixels. Default is 8% of size.",
    "fg": "Custom dot colour as hex, e.g. 0e0e0e (the # is optional). Implies style=custom.",
    "bg": "Custom background colour as hex. Implies style=custom.",
    "eye": "Custom corner colour as hex. Implies style=custom.",
    "dot": "Custom dot shape: square, rounded, dots, extra-rounded, classy. Implies style=custom.",
    "invert": "With format=term or ascii: true for a terminal with a light background. The default suits dark ones. Not needed for ansi, which brings its own colours.",
    "download": "true to send the file as an attachment instead of inline."
  },
  "styles": {
    "enso": "Ensō",
    "bw": "Black & white",
    "hippie": "Hippie",
    "night": "Night",
    "warm": "Warm",
    "custom": "Custom"
  },
  "types": [
    {
      "type": "url",
      "aliases": [
        "link"
      ],
      "label": "Link",
      "notes": "A bare host such as enso.no gets https:// prepended. `site`, `link`, `data` and `value` are accepted as aliases for `url`.",
      "fields": [
        {
          "name": "url",
          "label": "Web address",
          "required": true,
          "kind": "url",
          "example": "enso.no"
        }
      ],
      "example": {
        "type": "url",
        "url": "enso.no"
      }
    },
    {
      "type": "vcard",
      "aliases": [
        "contact"
      ],
      "label": "Contact",
      "notes": "At least one of firstName, lastName, phone or email is required.",
      "fields": [
        {
          "name": "firstName",
          "label": "First name",
          "required": false,
          "kind": "text",
          "example": "Kari"
        },
        {
          "name": "lastName",
          "label": "Last name",
          "required": false,
          "kind": "text",
          "example": "Nordmann"
        },
        {
          "name": "org",
          "label": "Organisation",
          "required": false,
          "kind": "text",
          "example": "Ensō"
        },
        {
          "name": "title",
          "label": "Job title",
          "required": false,
          "kind": "text",
          "example": "Developer"
        },
        {
          "name": "phone",
          "label": "Phone",
          "required": false,
          "kind": "tel",
          "example": "+47 123 45 678"
        },
        {
          "name": "email",
          "label": "Email",
          "required": false,
          "kind": "email",
          "example": "post@enso.no"
        },
        {
          "name": "url",
          "label": "Website",
          "required": false,
          "kind": "url",
          "example": "enso.no"
        }
      ],
      "example": {
        "type": "vcard",
        "firstName": "Kari",
        "lastName": "Nordmann",
        "phone": "+4712345678",
        "email": "post@enso.no"
      }
    },
    {
      "type": "wifi",
      "aliases": [],
      "label": "WiFi",
      "notes": "encryption defaults to WPA. Use encryption=nopass for an open network.",
      "fields": [
        {
          "name": "ssid",
          "label": "Network name (SSID)",
          "required": true,
          "kind": "text",
          "example": "EnsoGuest"
        },
        {
          "name": "password",
          "label": "Password",
          "required": false,
          "kind": "text",
          "example": "Leave empty for an open network"
        },
        {
          "name": "encryption",
          "label": "Security",
          "required": false,
          "kind": "select",
          "values": [
            "WPA",
            "WEP",
            "nopass"
          ]
        },
        {
          "name": "hidden",
          "label": "Hidden network",
          "required": false,
          "kind": "checkbox"
        }
      ],
      "example": {
        "type": "wifi",
        "ssid": "EnsoGuest",
        "password": "hemmelig",
        "encryption": "WPA"
      }
    },
    {
      "type": "email",
      "aliases": [],
      "label": "Email",
      "notes": null,
      "fields": [
        {
          "name": "to",
          "label": "To",
          "required": true,
          "kind": "email",
          "example": "post@enso.no"
        },
        {
          "name": "subject",
          "label": "Subject",
          "required": false,
          "kind": "text",
          "example": "Hei"
        },
        {
          "name": "body",
          "label": "Message",
          "required": false,
          "kind": "textarea",
          "example": "Optional prefilled message"
        }
      ],
      "example": {
        "type": "email",
        "to": "post@enso.no",
        "subject": "Hei"
      }
    },
    {
      "type": "phone",
      "aliases": [],
      "label": "Phone",
      "notes": null,
      "fields": [
        {
          "name": "phone",
          "label": "Phone number",
          "required": true,
          "kind": "tel",
          "example": "+47 123 45 678"
        }
      ],
      "example": {
        "type": "phone",
        "phone": "+4712345678"
      }
    },
    {
      "type": "sms",
      "aliases": [],
      "label": "SMS",
      "notes": null,
      "fields": [
        {
          "name": "phone",
          "label": "Phone number",
          "required": true,
          "kind": "tel",
          "example": "+47 123 45 678"
        },
        {
          "name": "message",
          "label": "Message",
          "required": false,
          "kind": "textarea",
          "example": "Optional prefilled message"
        }
      ],
      "example": {
        "type": "sms",
        "phone": "+4712345678",
        "message": "Hei"
      }
    },
    {
      "type": "text",
      "aliases": [],
      "label": "Text",
      "notes": null,
      "fields": [
        {
          "name": "text",
          "label": "Text",
          "required": true,
          "kind": "textarea",
          "example": "Any text you like"
        }
      ],
      "example": {
        "type": "text",
        "text": "Hello world"
      }
    },
    {
      "type": "event",
      "aliases": [],
      "label": "Event",
      "notes": "Times are local wall-clock time in Europe/Oslo. Without an end, the event lasts one hour. An end date without an end time means the end of that day.",
      "fields": [
        {
          "name": "title",
          "label": "Title",
          "required": true,
          "kind": "text",
          "example": "Ensō frokostseminar"
        },
        {
          "name": "location",
          "label": "Location",
          "required": false,
          "kind": "text",
          "example": "Oslo"
        },
        {
          "name": "startDate",
          "label": "Start date",
          "required": true,
          "kind": "date"
        },
        {
          "name": "startTime",
          "label": "Start time",
          "required": false,
          "kind": "time"
        },
        {
          "name": "endDate",
          "label": "End date",
          "required": false,
          "kind": "date"
        },
        {
          "name": "endTime",
          "label": "End time",
          "required": false,
          "kind": "time"
        },
        {
          "name": "description",
          "label": "Description",
          "required": false,
          "kind": "textarea",
          "example": "Optional details"
        }
      ],
      "example": {
        "type": "event",
        "title": "Frokostseminar",
        "startDate": "2026-11-03",
        "startTime": "08:30",
        "endTime": "10:00",
        "location": "Oslo"
      }
    },
    {
      "type": "geo",
      "aliases": [
        "location"
      ],
      "label": "Location",
      "notes": "Decimal degrees. Latitude -90 to 90, longitude -180 to 180.",
      "fields": [
        {
          "name": "lat",
          "label": "Latitude",
          "required": true,
          "kind": "number",
          "example": "59.9139"
        },
        {
          "name": "lng",
          "label": "Longitude",
          "required": true,
          "kind": "number",
          "example": "10.7522"
        }
      ],
      "example": {
        "type": "geo",
        "lat": "59.9139",
        "lng": "10.7522"
      }
    }
  ]
}
