Skip to main content
GET
/
domain
/
{id}
/
qr-code-data
Get domain QR code data
curl --request GET \
  --url https://api.h0p.co/domain/{id}/qr-code-data \
  --header 'x-api-key: <api-key>'
{
  "url": "https://h0p.co/abc123?qrCode=1",
  "options": {
    "data": "https://example.com/abc123",
    "type": "svg",
    "width": 300,
    "height": 300,
    "margin": 4,
    "image": "https://example.com/logo.png",
    "imageOptions": {
      "hideBackgroundDots": true,
      "imageSize": 0.4,
      "crossOrigin": "anonymous",
      "margin": 10
    },
    "dotsOptions": {
      "type": "rounded",
      "color": "#000000",
      "gradient": {
        "type": "linear",
        "colorStops": [
          {
            "offset": 0,
            "color": "#3B82F6"
          },
          {
            "offset": 1,
            "color": "#8B5CF6"
          }
        ],
        "rotation": 45
      },
      "roundSize": true
    },
    "cornersSquareOptions": {
      "type": "square",
      "color": "#3B82F6",
      "gradient": {
        "type": "linear",
        "colorStops": [
          {
            "offset": 0,
            "color": "#3B82F6"
          },
          {
            "offset": 1,
            "color": "#8B5CF6"
          }
        ],
        "rotation": 45
      }
    },
    "cornersDotOptions": {
      "type": "dot",
      "color": "#8B5CF6",
      "gradient": {
        "type": "linear",
        "colorStops": [
          {
            "offset": 0,
            "color": "#3B82F6"
          },
          {
            "offset": 1,
            "color": "#8B5CF6"
          }
        ],
        "rotation": 45
      }
    },
    "backgroundOptions": {
      "round": 0.1,
      "color": "#FFFFFF"
    }
  }
}

Authorizations

x-api-key
string
header
required

API Key authentication for programmatic access.

How to use:

  1. Create an API key from your dashboard settings
  2. Include the key in the x-api-key header with each request
  3. API keys have granular permissions (domains, shortLinks, files, stats, apiKeys)

Example:

curl -H "x-api-key: your-api-key-here" https://api.h0p.co/short-link/list

Types of API keys:

  • User keys: Linked to your user account (one per organization)
  • Bot keys: Autonomous machine users (one per organization)

Security notes:

  • Keep your API keys secure and never commit them to version control
  • API keys cannot access authentication endpoints (/auth/*)
  • Keys can be revoked at any time from the dashboard

Path Parameters

id
string<uuid>
required

Unique identifier in UUID v7 format

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

Response

QR code data for client-side generation

QR code generation data

url
string
required

URL to encode in QR code

Example:

"https://h0p.co/abc123?qrCode=1"

options
object

QR code styling options