Use the QRW API to create short links programmatically from your own applications.
https://api.qrw.io/api/v1Every request must include your API key in the request header. You can obtain your API key from the Settings → API Keys page.
| Header | Value |
|---|---|
X-Api-Key | Your API key |
If the key is missing, invalid, or inactive the request is rejected with 401 Unauthorized.
/api/v1/link/createCreates a new short link with a redirect URL and optional labels.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
redirecturl | string | Yes | — | The destination URL to redirect to |
labels | string | No | null | Comma-separated labels/tags for the link |
length | integer | No | 20 | Slug length (min: 3, longer = cheaper) |
{
"link": "aB3kR7mN",
"url": "https://qrw.io/aB3kR7mN",
"linkId": 42,
"message": "success"
}| Field | Type | Description |
|---|---|---|
link | string | The generated short link slug |
url | string | Full short URL (https://qrw.io/{slug}) |
linkId | integer | Internal link ID |
message | string | "success" |
{ "error": "Not enough credits! Required: 10, available: 3" }{ "error": "Length must be at least 3" }{ "error": "Invalid or inactive API key" }{ "error": "User not found" }Shorter slugs cost more credits. The length parameter controls the slug length and its credit cost.
| Length | Credits |
|---|---|
| 3 | 12,500 |
| 4 | 7,000 |
| 5 | 2,000 |
| 6 | 800 |
| 7 | 300 |
| 8 | 160 |
| 9 | 80 |
| 10 | 40 |
| 11–19 | 12–30 |
| 20+ | 10 |
curl -X POST "https://api.qrw.io/api/v1/link/create" \ -H "X-Api-Key: your_api_key_here" \ -d "redirecturl=https://example.com/my-page" \ -d "labels=marketing,summer" \ -d "length=8"
Response:
{
"link": "aB3kRm7N",
"url": "https://qrw.io/aB3kRm7N",
"linkId": 42,
"message": "success"
}Need an API key? Generate one from your account settings.
Go to Settings → API Keys