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
/qrcodesCreate a new QR code with customized settings.
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content | string | Yes | Content to encode in the QR code (URL, text, etc.) |
size | integer | No | Size in pixels (default: 300) |
format | string | No | Image format: png or svg (default: png) |
color | string | No | Hex 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
/urlsCreate a new shortened URL with optional custom alias.
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
long_url | string | Yes | The URL to shorten |
alias | string | No | Custom short URL path (if available) |
title | string | No | Title for organizing your links |
expires_at | string | No | Expiration 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" } }