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.

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:

NameTypeRequiredDescription
destinationUrlstringYesTarget URL (must be valid URL)
shortCodestringNoCustom short code (3-30 chars, alphanumeric/dash/underscore). Auto-generated if omitted.
titlestringNoDisplay title (max 255 chars)
descriptionstringNoDescription (max 2000 chars)
contentTypestringNoContent type identifier (default: “url”)
isDynamicbooleanNoWhether the destination can be changed after creation (default: true)
folderIdstringNoFolder ID for organization
tagsstring[]NoTags for categorization
utmParamsobjectNoUTM tracking parameters
expiresAtstringNoExpiration datetime (ISO 8601)
passwordstringNoPassword 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:

CodeDescription
409Short code already in use within this organization

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:

NameTypeRequiredDescription
folderIdstring (query)NoFilter by folder
searchstring (query)NoCase-insensitive search on title
contentTypestring (query)NoFilter by content type
sortBystring (query)NocreatedAt (default), clickCount, title
sortDirstring (query)Noasc or desc (default)
limitnumber (query)NoResults per page (default: 20, max: 100)
offsetnumber (query)NoPagination offset (default: 0)

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


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 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


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:

NameTypeRequiredDescription
idstringYesLink ID
dateFromstring (query)NoStart date for analytics window
dateTostring (query)NoEnd 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:

NameTypeRequiredDescription
entityTypestringYesboard, item, or action
entityIdstringYesThe 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.

ProcedureTypeDescription
linkHub.generateQrmutationGenerate a QR code SVG for any link
linkHub.createFoldermutationCreate a link folder for organization
linkHub.listFoldersqueryList link folders
linkHub.updateFoldermutationUpdate folder name or description
linkHub.deleteFoldermutationRemove a folder
linkHub.createDomainmutationRegister a custom short link domain
linkHub.listDomainsqueryList custom domains
linkHub.createPagemutationCreate a bio-link or landing page
linkHub.listPagesqueryList link pages

Error Codes

CodeDescription
400Invalid input (unsupported entity type, invalid URL)
401Missing or invalid authentication
404Link, folder, or entity not found
409Short code already in use
410Link has expired