Support Integration Document

Integrate QR code generation and short link creation directly into your applications with our powerful and flexible API.

API Overview

Our RESTful API allows you to programmatically generate QR codes and create short links. All API requests are made to endpoints beginning with:

https://api.sparrown.com/v1/

QR Code Generation

Create custom QR codes with various formats, colors, and embedded data.

URL Shortening

Generate and manage branded short links with analytics tracking.

QR Code API

Generate a QR Code

POST/qrcodes

Create a new QR code with customized settings.

Request Body Parameters

ParameterTypeRequiredDescription
contentstringYesContent to encode in the QR code (URL, text, etc.)
sizeintegerNoSize in pixels (default: 300)
formatstringNoImage format: png or svg (default: png)
colorstringNoHex color code (default: #000000)

Example Request

curl -X POST https://api.yourqrplatform.com/v1/qrcodes \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
        "content": "https://example.com",
        "size": 400,
        "format": "png",
        "color": "#4F46E5"
}'

Example Response

{
    "id": "qr_8fJ2m5k7pL",
    "content": "https://example.com",
    "created_at": "2025-05-17T10:30:45Z",
    "size": 400,
    "format": "png",
    "color": "#4F46E5",
    "url": "https://yourqrplatform.com/qr/8fJ2m5k7pL",
    "image_url": "https://yourqrplatform.com/qr/8fJ2m5k7pL.png"
}

URL Shortener API

Create a Short URL

POST/urls

Create a new shortened URL with optional custom alias.

Request Body Parameters

ParameterTypeRequiredDescription
long_urlstringYesThe URL to shorten
aliasstringNoCustom short URL path (if available)
titlestringNoTitle for organizing your links
expires_atstringNoExpiration date in ISO format

Example Request

curl -X POST https://api.yourqrplatform.com/v1/urls \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "long_url": "https://example.com/very/long/path/to/resource",
    "alias": "mylink",
    "title": "My Example Link"
  }'

Example Response

{
  "id": "url_9hK3p6n8qR",
  "created_at": "2025-05-17T10:35:22Z",
  "long_url": "https://example.com/very/long/path/to/resource",
  "short_url": "https://yrqr.io/mylink",
  "alias": "mylink",
  "title": "My Example Link",
  "clicks": 0,
  "qr_code": {
    "url": "https://yourqrplatform.com/qr/url_9hK3p6n8qR"
  }
}