> ## Documentation Index
> Fetch the complete documentation index at: https://docs.h0p.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get short link QR code data

> Get QR code data for client-side generation.

**Returns:** URL with tracking param and QR code styling options
**Usage:** Use qr-code-styling library on client to render the QR code



## OpenAPI

````yaml https://api.h0p.co/doc get /short-link/{id}/qr-code-data
openapi: 3.0.0
info:
  version: 0.0.3
  title: h0p API
  description: >-
    # h0p URL Shortener API


    A modern, feature-rich URL shortener API with advanced analytics, custom
    domains, QR codes, and comprehensive link management capabilities.


    ## Features


    - 🔗 **Short Link Management**: Create, update, and delete short links with
    custom slugs

    - 🌐 **Custom Domains**: Use your own domains with DNS verification and deep
    linking support

    - 📊 **Analytics**: Detailed click tracking with geolocation, device, and
    referrer data

    - 🎨 **QR Codes**: Generate customizable QR codes with branding options

    - 🏷️ **Organization**: Folders and tags for better link organization

    - 🔐 **Security**: Password protection, expiration dates, and click limits

    - 🎯 **Smart Rules**: Geographic, language, and device-based routing

    - 🪝 **Webhooks**: Real-time notifications for link events

    - 🔑 **API Keys**: Programmatic access with granular permissions

    - ⚡ **Rate Limiting**: Built-in protection against abuse


    ## Authentication


    This API supports two authentication methods:


    1. **Session Authentication**: Cookie-based authentication for web
    applications

    2. **API Key Authentication**: Header-based authentication for programmatic
    access


    See the security schemes section below for implementation details.


    ## Rate Limits


    - Free plan: 10 short links, 1 custom domain, 3 tags

    - Premium plan: unlimited short links, 100 custom domains, 100 tags, 100
    folders, advanced features


    ## Support


    For questions, feature requests, or bug reports, please contact
    support@h0p.co
  termsOfService: https://h0p.co/terms
  contact:
    name: h0p Support
    email: contact@h0p.co
servers:
  - url: https://api.h0p.co
    description: Production API server
security: []
tags:
  - name: Domain
    description: >-
      Custom domain management with DNS verification, QR templates, and deep
      linking support
  - name: Short Link
    description: >-
      Create and manage short links with advanced features like smart routing,
      password protection, and custom QR codes
  - name: Folder
    description: >-
      Organize short links into folders for better management and statistics
      tracking
  - name: Tag
    description: Categorize and filter short links using customizable tags
  - name: Files
    description: Upload images for QR codes, meta tags, and organization branding
  - name: Statistics
    description: >-
      Access detailed analytics grouped by geographic, device, and traffic
      dimensions
paths:
  /short-link/{id}/qr-code-data:
    get:
      tags:
        - Short Link
      summary: Get short link QR code data
      description: |-
        Get QR code data for client-side generation.

        **Returns:** URL with tracking param and QR code styling options
        **Usage:** Use qr-code-styling library on client to render the QR code
      parameters:
        - schema:
            type: string
            format: uuid
            example: 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Unique identifier in UUID v7 format
          required: true
          description: Unique identifier in UUID v7 format
          name: id
          in: path
      responses:
        '200':
          description: QR code data for client-side generation
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://h0p.co/abc123?qrCode=1
                    description: URL to encode in QR code
                  options:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - svg
                          - canvas
                        example: svg
                        description: Output format for QR code generation
                      width:
                        type: number
                        minimum: 100
                        exclusiveMinimum: true
                        example: 300
                        description: QR code width in pixels
                        maximum: 2000
                      height:
                        type: number
                        minimum: 100
                        exclusiveMinimum: true
                        example: 300
                        description: QR code height in pixels
                        maximum: 2000
                      margin:
                        type: number
                        minimum: 0
                        example: 4
                        description: Quiet zone margin around QR code (in modules)
                      data:
                        type: string
                        example: https://example.com/abc123
                        description: Data to encode in QR code
                      image:
                        type: string
                        format: uri
                        example: https://example.com/logo.png
                        description: Logo/image URL to embed in QR code center
                      imageOptions:
                        type: object
                        properties:
                          hideBackgroundDots:
                            type: boolean
                            example: true
                            description: Hide QR dots behind the logo image
                          imageSize:
                            type: number
                            minimum: 0
                            maximum: 1
                            example: 0.4
                            description: Logo size relative to QR code (0-1)
                          crossOrigin:
                            type: string
                            example: anonymous
                            description: CORS setting for loading external images
                          margin:
                            type: number
                            minimum: 0
                            example: 10
                            description: Padding around logo in pixels
                        description: Logo image customization options
                      dotsOptions:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dots
                              - rounded
                              - classy
                              - classy-rounded
                              - square
                              - extra-rounded
                            description: Visual style for QR code data dots
                            example: rounded
                          color:
                            type: string
                            pattern: ^#[0-9A-Fa-f]{6}$
                            example: '#000000'
                            description: Hex color for QR code dots
                          gradient:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - radial
                                  - linear
                                description: Gradient type
                                example: linear
                              rotation:
                                type: number
                                example: 45
                                description: Gradient rotation angle in degrees
                                minimum: 0
                                maximum: 360
                              colorStops:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    offset:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                      example: 0.5
                                      description: Position of color stop (0-1)
                                    color:
                                      type: string
                                      pattern: ^#[0-9A-Fa-f]{6}$
                                      example: '#3B82F6'
                                      description: Hex color code for this stop
                                  required:
                                    - offset
                                    - color
                                  description: Color stop definition for gradient
                                minItems: 2
                                description: Array of color stops defining the gradient
                                example:
                                  - offset: 0
                                    color: '#3B82F6'
                                  - offset: 1
                                    color: '#8B5CF6'
                            required:
                              - type
                              - colorStops
                            description: Gradient configuration for dots
                          roundSize:
                            type: boolean
                            example: true
                            description: Apply rounding size algorithm
                        description: Customization options for QR code data dots
                      cornersSquareOptions:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dot
                              - square
                              - extra-rounded
                              - dots
                              - rounded
                              - classy
                              - classy-rounded
                            description: Visual style for corner squares (outer ring)
                            example: square
                          color:
                            type: string
                            pattern: ^#[0-9A-Fa-f]{6}$
                            example: '#3B82F6'
                            description: Hex color for corner squares
                          gradient:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - radial
                                  - linear
                                description: Gradient type
                                example: linear
                              rotation:
                                type: number
                                example: 45
                                description: Gradient rotation angle in degrees
                                minimum: 0
                                maximum: 360
                              colorStops:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    offset:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                      example: 0.5
                                      description: Position of color stop (0-1)
                                    color:
                                      type: string
                                      pattern: ^#[0-9A-Fa-f]{6}$
                                      example: '#3B82F6'
                                      description: Hex color code for this stop
                                  required:
                                    - offset
                                    - color
                                  description: Color stop definition for gradient
                                minItems: 2
                                description: Array of color stops defining the gradient
                                example:
                                  - offset: 0
                                    color: '#3B82F6'
                                  - offset: 1
                                    color: '#8B5CF6'
                            required:
                              - type
                              - colorStops
                            description: Gradient for corner squares
                        description: Customization for corner position detection squares
                      cornersDotOptions:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - dot
                              - square
                              - dots
                              - rounded
                              - classy
                              - classy-rounded
                              - extra-rounded
                            description: Visual style for corner dots (inner dot)
                            example: dot
                          color:
                            type: string
                            pattern: ^#[0-9A-Fa-f]{6}$
                            example: '#8B5CF6'
                            description: Hex color for corner dots
                          gradient:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - radial
                                  - linear
                                description: Gradient type
                                example: linear
                              rotation:
                                type: number
                                example: 45
                                description: Gradient rotation angle in degrees
                                minimum: 0
                                maximum: 360
                              colorStops:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    offset:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                      example: 0.5
                                      description: Position of color stop (0-1)
                                    color:
                                      type: string
                                      pattern: ^#[0-9A-Fa-f]{6}$
                                      example: '#3B82F6'
                                      description: Hex color code for this stop
                                  required:
                                    - offset
                                    - color
                                  description: Color stop definition for gradient
                                minItems: 2
                                description: Array of color stops defining the gradient
                                example:
                                  - offset: 0
                                    color: '#3B82F6'
                                  - offset: 1
                                    color: '#8B5CF6'
                            required:
                              - type
                              - colorStops
                            description: Gradient for corner dots
                        description: Customization for corner position detection dots
                      backgroundOptions:
                        type: object
                        properties:
                          round:
                            type: number
                            minimum: 0
                            maximum: 1
                            example: 0.1
                            description: Background corner rounding (0-1)
                          color:
                            type: string
                            pattern: ^#[0-9A-Fa-f]{6}$
                            example: '#FFFFFF'
                            description: Hex color for QR code background
                        description: Background customization options
                    required:
                      - data
                    description: QR code styling options
                required:
                  - url
                description: QR code generation data
        '403':
          description: >-
            Forbidden - Missing required permission. Check your API key
            permissions or organization role.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - ACTION_NOT_ALLOWED
                    description: Error code for permission denied
                  message:
                    type: string
                    example: You do not have permission to delete domains
                    description: Detailed explanation of the permission issue
                  resource:
                    type: string
                    example: domains
                    description: The resource type that was accessed
                  action:
                    type: string
                    example: delete
                    description: The action that was attempted
                required:
                  - code
                  - message
              example:
                code: ACTION_NOT_ALLOWED
                message: You do not have permission to delete domains
                resource: domains
                action: delete
        '404':
          description: >-
            Resource not found - The requested resource does not exist or you do
            not have access to it
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    description: Error code indicating the requested resource was not found
                required:
                  - code
              example:
                code: NOT_FOUND
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        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

````