Links & QR Codes API
Short link management with UTM tracking, QR code generation, click analytics, and folder organization.
Links & QR Codes API
ProBeya’s Link Hub provides short link management with UTM parameter tracking, password protection, expiration dates, custom short codes, and detailed click analytics. The QR Code module generates scannable QR codes for boards, items, and actions that encode deep links into the application.
Link Hub
Endpoints
POST /api/v1/links
Create a new short link with optional UTM parameters, custom short code, expiry date, and password protection.
tRPC: linkHub.createLink
Auth: Bearer token required (scope: write:items) or session cookie
Org context: Required
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
destinationUrl | string | Yes | Target URL (must be valid URL) |
shortCode | string | No | Custom short code (3-30 chars, alphanumeric/dash/underscore). Auto-generated if omitted. |
title | string | No | Display title (max 255 chars) |
description | string | No | Description (max 2000 chars) |
contentType | string | No | Content type identifier (default: “url”) |
isDynamic | boolean | No | Whether the destination can be changed after creation (default: true) |
folderId | string | No | Folder ID for organization |
tags | string[] | No | Tags for categorization |
utmParams | object | No | UTM tracking parameters |
expiresAt | string | No | Expiration datetime (ISO 8601) |
password | string | No | Password protection (1-128 chars) |
UTM parameters object:
{
"utm_source": "email",
"utm_medium": "newsletter",
"utm_campaign": "q2-launch",
"utm_term": "lean-management",
"utm_content": "cta-button"
}
Example:
curl -X POST -H "Authorization: Bearer probeya_sk_live_..." \
-H "Content-Type: application/json" \
-d '{"destinationUrl":"https://app.probeya.com/board/xyz","shortCode":"board-xyz","title":"Q2 Board"}' \
"https://acme.probeya.com/api/v1/links"
Response:
{
"data": {
"id": "clx9lk001",
"shortCode": "board-xyz",
"destinationUrl": "https://app.probeya.com/board/xyz",
"title": "Q2 Board",
"clickCount": 0,
"isActive": true,
"isDynamic": true,
"createdAt": "2026-04-01T10:00:00.000Z"
}
}
Errors:
| Code | Description |
|---|---|
| 409 | Short code already in use within this organization |
GET /api/v1/links
Paginated list of links with search, folder filter, and sorting options.
tRPC: linkHub.listLinks
Auth: Bearer token required (scope: read:items) or session cookie
Org context: Required
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
folderId | string (query) | No | Filter by folder |
search | string (query) | No | Case-insensitive search on title |
contentType | string (query) | No | Filter by content type |
sortBy | string (query) | No | createdAt (default), clickCount, title |
sortDir | string (query) | No | asc or desc (default) |
limit | number (query) | No | Results per page (default: 20, max: 100) |
offset | number (query) | No | Pagination offset (default: 0) |
GET /api/v1/links/:id
Fetch a single link with its QR design, folder, and custom domain information.
tRPC: linkHub.getLink
Auth: Bearer token required (scope: read:items) or session cookie
Org context: Required
PATCH /api/v1/links/:id
Update link fields including destination URL, title, tags, UTM parameters, expiry, and password.
tRPC: linkHub.updateLink
Auth: Bearer token required (scope: write:items) or session cookie
Org context: Required
DELETE /api/v1/links/:id
Delete a link and its associated click history.
tRPC: linkHub.deleteLink
Auth: Bearer token required (scope: write:items) or session cookie
Org context: Required
POST /api/v1/links/bulk
Create multiple links in a single request for batch operations.
tRPC: linkHub.bulkCreate
Auth: Bearer token required (scope: write:items) or session cookie
Org context: Required
GET /api/v1/links/:id/analytics
Detailed click analytics for a link including time-series data, geographic distribution, device types, browsers, operating systems, and referrer sources.
tRPC: linkHub.getClickAnalytics
Auth: Bearer token required (scope: read:items) or session cookie
Org context: Required
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Link ID |
dateFrom | string (query) | No | Start date for analytics window |
dateTo | string (query) | No | End date for analytics window |
Response:
{
"totalClicks": 1247,
"uniqueVisitors": 892,
"timeSeries": [
{ "date": "2026-04-01", "clicks": 45 },
{ "date": "2026-04-02", "clicks": 62 }
],
"countries": [{ "country": "US", "clicks": 520 }],
"devices": [{ "type": "desktop", "clicks": 780 }],
"browsers": [{ "name": "Chrome", "clicks": 640 }],
"os": [{ "name": "Windows", "clicks": 420 }],
"referrers": [{ "source": "email", "clicks": 310 }]
}
GET /go/:code
Public redirect endpoint that resolves a short code and redirects to the destination URL. Logs the click with device, browser, OS, and referrer metadata.
tRPC: linkHub.resolveShortCode (query) + linkHub.logClick (mutation)
Auth: None required (public)
QR Codes
Generate QR codes as PNG data URLs for ProBeya entities. QR codes encode deep links enabling quick access from printed materials, shopfloor displays, and mobile devices.
Endpoints
POST /api/v1/qr-code
Generate a QR code for a board, item, or action. Validates that the entity exists and belongs to the caller’s organization.
tRPC: qrCode.generate
Auth: Bearer token required (scope: read:items) or session cookie
Org context: Required
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | board, item, or action |
entityId | string | Yes | The entity ID to generate a QR code for |
Response:
{
"dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
"entityUrl": "https://acme.probeya.com/board/clx9bd001"
}
The dataUrl can be displayed directly in an <img> tag or downloaded as a PNG file. QR codes use medium error correction (15% recovery) and 300px width.
tRPC-Only Link Hub Procedures
| Procedure | Type | Description |
|---|---|---|
linkHub.generateQr | mutation | Generate a QR code SVG for any link |
linkHub.createFolder | mutation | Create a link folder for organization |
linkHub.listFolders | query | List link folders |
linkHub.updateFolder | mutation | Update folder name or description |
linkHub.deleteFolder | mutation | Remove a folder |
linkHub.createDomain | mutation | Register a custom short link domain |
linkHub.listDomains | query | List custom domains |
linkHub.createPage | mutation | Create a bio-link or landing page |
linkHub.listPages | query | List link pages |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid input (unsupported entity type, invalid URL) |
| 401 | Missing or invalid authentication |
| 404 | Link, folder, or entity not found |
| 409 | Short code already in use |
| 410 | Link has expired |
Was this page helpful?